Class RolesPrintingServletUtils
java.lang.Object
org.jboss.as.test.integration.security.common.RolesPrintingServletUtils
Utils class for related methods to printing roles by
org.jboss.as.test.integration.security.common.servlets.RolePrintingServlet.- Author:
- olukas
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertExpectedRoles(String rolesResponse, String[] allPossibleRoles, String[] expectedAssignedRoles) Check whether Response includes only expected roles.static URLprepareRolePrintingUrl(URL webAppURL, String[] allPossibleRoles) Prepare URL for printing all possible roles.
-
Constructor Details
-
RolesPrintingServletUtils
public RolesPrintingServletUtils()
-
-
Method Details
-
prepareRolePrintingUrl
Prepare URL for printing all possible roles.- Parameters:
webAppURL- application root URLallPossibleRoles- all possible roles which will be checked byRolePrintingServlets- Returns:
-
assertExpectedRoles
public static void assertExpectedRoles(String rolesResponse, String[] allPossibleRoles, String[] expectedAssignedRoles) Check whether Response includes only expected roles. It checks whether all expected roles are included and whether no other role is included.- Parameters:
rolesResponse- body of HTTP responseallPossibleRoles- all possible roles which can be assignedexpectedAssignedRoles- roles which will be checked whether they were assigned to user
-