diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RMRolesAndActionsAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RMRolesAndActionsAPI.java index b3af63a3ab..d0ff77e754 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RMRolesAndActionsAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RMRolesAndActionsAPI.java @@ -105,15 +105,15 @@ public class RMRolesAndActionsAPI extends BaseAPI { userService.create(adminUser, adminPassword, userName, password, email, firstName, lastName); } - assignUserToRole(adminUser, adminPassword, userName, role); + assignRoleToUser(adminUser, adminPassword, userName, role); } /** - * assign user to records management role + * Assign a records management role to a user. * * @throws AssertionError if the assignation is unsuccessful. */ - public void assignUserToRole(String adminUser, String adminPassword, String userName, String role) + public void assignRoleToUser(String adminUser, String adminPassword, String userName, String role) { AlfrescoHttpClient client = alfrescoHttpClientFactory.getObject(); String reqURL = MessageFormat.format( @@ -138,7 +138,7 @@ public class RMRolesAndActionsAPI extends BaseAPI } client.close(); } - assertEquals("Assigning user " + userName + " to role " + role + " failed.", SC_OK, + assertEquals("Assigning role " + role + " to user " + userName + " failed.", SC_OK, response.getStatusLine().getStatusCode()); } diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RulesAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RulesAPI.java index 5e34d67830..6d199a8368 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RulesAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/v0/RulesAPI.java @@ -69,7 +69,6 @@ public class RulesAPI extends BaseAPI * @param ruleProperties the rule properties * @return The HTTP Response (or null if the response could not be understood). */ - public HttpResponse createRule(String username, String password, String containerNodeRef, RuleDefinition ruleProperties) { try @@ -90,7 +89,6 @@ public class RulesAPI extends BaseAPI * @param ruleProperties the rule properties * @return true if the rule has been updated successfully, false otherwise */ - public JSONObject updateRule(String username, String password, String containerNodeRef, RuleDefinition ruleProperties) { String ruleId = ruleProperties.getId(); @@ -131,7 +129,7 @@ public class RulesAPI extends BaseAPI * @param username the user performing the request * @param password the password * @param containerNodeRef the container on which the rules have been created - * @throws if at least one of the rules could not be deleted. + * @throws AssertionError if at least one of the rules could not be deleted. */ public void deleteAllRulesOnContainer(String username, String password, String containerNodeRef) { diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java index aedeed3704..022cd663f3 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java @@ -593,7 +593,7 @@ public class BaseRMRestTest extends RestTest String userPermission, String userRole) throws Exception { getRestAPIFactory().getRMUserAPI().addUserPermission(categoryId, user, userPermission); - rmRolesAndActionsAPI.assignUserToRole(getAdminUser().getUsername(), + rmRolesAndActionsAPI.assignRoleToUser(getAdminUser().getUsername(), getAdminUser().getPassword(), user.getUsername(), userRole); }