Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)

121864 gjames: RA-774 Allow the use of "Void" parameter type


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126429 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jamal Kaabi-Mofrad
2016-05-10 10:53:24 +00:00
parent c03accdbea
commit 7c27b2070f
4 changed files with 79 additions and 27 deletions

View File

@@ -20,7 +20,7 @@ public class GrassEntityResource implements EntityResourceAction.ReadById<Grass>
}
@Action("cut")
public String cutLawn(String id, Parameters parameters) {
public String cutLawn(String id, Void notused, Parameters parameters) {
return "All done";
}

View File

@@ -420,7 +420,7 @@ public class InspectorTests
assertTrue("GrassEntityResource supports POST", resourceMetadata.supports(HttpMethod.POST));
assertFalse("GrassEntityResource does not support GET", resourceMetadata.supports(HttpMethod.GET));
assertNull(resourceMetadata.getObjectType(HttpMethod.POST));
result = (String) ResourceInspectorUtil.invokeMethod(actionMethod,grassEntityResource, "xyz", Params.valueOf("notUsed", null));
result = (String) ResourceInspectorUtil.invokeMethod(actionMethod,grassEntityResource, "xyz", null, Params.valueOf("notUsed", null));
assertEquals("All done",result);
break;
default: