Class RolesPrintingServletUtils

java.lang.Object
org.jboss.as.test.integration.security.common.RolesPrintingServletUtils

public class RolesPrintingServletUtils extends Object
Utils class for related methods to printing roles by org.jboss.as.test.integration.security.common.servlets.RolePrintingServlet.
Author:
olukas
  • Constructor Details

    • RolesPrintingServletUtils

      public RolesPrintingServletUtils()
  • Method Details

    • prepareRolePrintingUrl

      public static URL prepareRolePrintingUrl(URL webAppURL, String[] allPossibleRoles)
      Prepare URL for printing all possible roles.
      Parameters:
      webAppURL - application root URL
      allPossibleRoles - all possible roles which will be checked by RolePrintingServlets
      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 response
      allPossibleRoles - all possible roles which can be assigned
      expectedAssignedRoles - roles which will be checked whether they were assigned to user