Class RestUtils

java.lang.Object
com.atlassian.crowd.test.util.RestUtils

public class RestUtils extends Object
  • Field Details

  • Method Details

    • adminRequest

      public static io.restassured.specification.RequestSpecification adminRequest()
    • adminRequest

      public static io.restassured.specification.RequestSpecification adminRequest(io.restassured.http.ContentType contentType, io.restassured.http.ContentType accept)
    • secondAdminRequest

      public static io.restassured.specification.RequestSpecification secondAdminRequest()
    • anonymousRequest

      public static io.restassured.specification.RequestSpecification anonymousRequest()
    • anonymousRequest

      public static io.restassured.specification.RequestSpecification anonymousRequest(io.restassured.http.ContentType contentType, io.restassured.http.ContentType accept)
    • appRequest

      public static io.restassured.specification.RequestSpecification appRequest()
    • appRequest

      public static io.restassured.specification.RequestSpecification appRequest(String appName, String password)
    • regularUserRequest

      public static io.restassured.specification.RequestSpecification regularUserRequest()
    • userRequest

      public static io.restassured.specification.RequestSpecification userRequest(String username, String password)
    • userRequest

      public static io.restassured.specification.RequestSpecification userRequest(String username, String password, io.restassured.http.ContentType contentType, io.restassured.http.ContentType accept)
    • assertScheduledJobProperty

      public static void assertScheduledJobProperty(String baseUrl, String id, String field, org.hamcrest.Matcher<?> matcher)
    • setPluginSetting

      public static void setPluginSetting(String baseUrl, String key, Object value)
    • getPluginSetting

      public static <T> T getPluginSetting(String baseUrl, String key)
    • isClustered

      public static boolean isClustered(String baseUrl)
    • getClusterNodeIds

      public static Collection<String> getClusterNodeIds(String baseUrl)
    • setDirectoryMappingIndex

      public static void setDirectoryMappingIndex(String baseUrl, String appName, String dirName, int index)
    • withCookie

      public static io.restassured.specification.RequestSpecification withCookie(String cookieName, String cookieValue)
    • getApplication

      public static ApplicationEntity getApplication(String baseUrl, String applicationName)
    • getApplicationDirectoryMappings

      public static List<DirectoryMappingEntity> getApplicationDirectoryMappings(String baseUrl, long appId)
    • getApplicationDirectoryMapping

      public static DirectoryMappingEntity getApplicationDirectoryMapping(String baseUrl, long appId, long directoryId)
    • setDirectoryMappingIndex

      public static void setDirectoryMappingIndex(String baseUrl, long appId, long dirId, int index)
    • addDirectoryMapping

      public static void addDirectoryMapping(String baseUrl, long appId, long dirId)
    • addDirectoryMapping

      public static void addDirectoryMapping(String baseUrl, long appId, long directoryId, boolean allowAll, Set<String> allowedGroups)
    • loginAsAdmin

      public static LoginResult loginAsAdmin(String baseUrl)
    • loginAsUser

      public static LoginResult loginAsUser(String baseUrl, String username, String password)
    • loginAsUser

      public static LoginResult loginAsUser(String baseUrl, String username, String password, boolean addCsrfHeader)
    • assignGroupLevelAdmin

      public static void assignGroupLevelAdmin(DirectoryEntityId groupLevelAdminId, DirectoryEntityId groupTargetId)
    • relativeLocation

      public static URI relativeLocation(io.restassured.response.Response response, String baseUrl) throws MalformedURLException, URISyntaxException
      Throws:
      MalformedURLException
      URISyntaxException