Class CrowdMatchers

java.lang.Object
com.atlassian.crowd.test.matchers.CrowdMatchers

public class CrowdMatchers extends Object
  • Constructor Details

    • CrowdMatchers

      public CrowdMatchers()
  • Method Details

    • user

      public static <T extends User> UserMatcher<T> user()
      Type Parameters:
      T - type of user, to avoid casting
      Returns:
      a matcher which matches any user
      See Also:
    • user

      public static <T extends User> UserMatcher<T> user(Class<T> type)
      A matcher that matches any user; synonymous with user() but its argument is used to set the matcher type.
      Type Parameters:
      T - type of user, to avoid casting
      Parameters:
      type - type of user, to avoid casting (this type is not checked at runtime).
      Returns:
      a matcher which matches any user
      See Also:
    • userNamed

      public static <T extends User> UserMatcher<T> userNamed(String name)
      Type Parameters:
      T - type of user, to avoid casting
      Returns:
      a matcher which matches a user with the given name
      See Also:
    • group

      public static <T extends Group> GroupMatcher<T> group()
      Type Parameters:
      T - type of group, to avoid casting
      Returns:
      a matcher which matches any group
      See Also:
    • group

      public static <T extends Group> GroupMatcher<T> group(Class<T> type)
      A matcher that matches any group; synonymous with group() but its argument is used to set the matcher type.
      Type Parameters:
      T - type of group, to avoid casting
      Parameters:
      type - type of group, to avoid casting (this type is not checked at runtime).
      Returns:
      a matcher which matches any group
      See Also:
    • groupNamed

      public static <T extends Group> GroupMatcher<T> groupNamed(String name)
      Type Parameters:
      T - type of group, to avoid casting
      Returns:
      a matcher which matches a group of the given name
      See Also:
    • directoryGroup

      public static <T extends DirectoryGroup> DirectoryGroupMatcher<T> directoryGroup()
    • permittedGroup

      public static <T extends PermittedGroup> PermittedGroupMatcher<T> permittedGroup()
    • directory

      public static DirectoryMatcher directory()
      Returns:
      a matcher that matches any directory
    • application

      public static ApplicationMatcher application()
      Returns:
      a matcher that matches any application
    • directoryWithId

      public static org.hamcrest.Matcher<Directory> directoryWithId(Long id)
      Parameters:
      id - ID to match
      Returns:
      matcher that matches directories with a specific ID value
      Since:
      2.7.2
    • directoryWithIdThat

      public static org.hamcrest.Matcher<Directory> directoryWithIdThat(org.hamcrest.Matcher<Long> idMatcher)
      Parameters:
      idMatcher - matcher for directory ID
      Returns:
      directory matcher that matches directories with IDs matching idMatcher.
      Since:
      2.7.2
    • applicationWithId

      public static org.hamcrest.Matcher<Application> applicationWithId(Long id)
    • applicationWithIdThat

      public static org.hamcrest.Matcher<Application> applicationWithIdThat(org.hamcrest.Matcher<Long> idMatcher)
    • directoryWithName

      public static org.hamcrest.Matcher<Directory> directoryWithName(String name)
      Parameters:
      name - name to match
      Returns:
      matcher that matches directories with a specific name
      Since:
      2.7.2
    • directoryWithNameThat

      public static org.hamcrest.Matcher<Directory> directoryWithNameThat(org.hamcrest.Matcher<String> nameMatcher)
      Parameters:
      nameMatcher - matcher for directory name
      Returns:
      directory matcher that matches directories with name matching nameMatcher.
      Since:
      2.7.2
    • entityWithAttributes

      public static <T extends Attributes> AttributesMatcher<T> entityWithAttributes()
      Type Parameters:
      T - type of entity with attributes, to avoid casting
      Returns:
      a matcher which matches any entity with attributes
      See Also:
    • entityWithAttributes

      public static <T extends Attributes> AttributesMatcher<T> entityWithAttributes(Class<T> type)
      A matcher that matches any entity with attributes; synonymous with entityWithAttributes() but its argument is used to set the matcher type.
      Type Parameters:
      T - type of entity with attributes, to avoid casting
      Parameters:
      type - type of entity with attributes, to avoid casting (this type is not checked at runtime).
      Returns:
      a matcher which matches any entity with attributes
      See Also: