Class CrowdMatchers
java.lang.Object
com.atlassian.crowd.test.matchers.CrowdMatchers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ApplicationMatcherstatic org.hamcrest.Matcher<Application> static org.hamcrest.Matcher<Application> applicationWithIdThat(org.hamcrest.Matcher<Long> idMatcher) static DirectoryMatcherstatic <T extends DirectoryGroup>
DirectoryGroupMatcher<T> static org.hamcrest.Matcher<Directory> directoryWithId(Long id) static org.hamcrest.Matcher<Directory> directoryWithIdThat(org.hamcrest.Matcher<Long> idMatcher) static org.hamcrest.Matcher<Directory> directoryWithName(String name) static org.hamcrest.Matcher<Directory> directoryWithNameThat(org.hamcrest.Matcher<String> nameMatcher) static <T extends Attributes>
AttributesMatcher<T> static <T extends Attributes>
AttributesMatcher<T> entityWithAttributes(Class<T> type) A matcher that matches any entity with attributes; synonymous withentityWithAttributes()but its argument is used to set the matcher type.static <T extends Group>
GroupMatcher<T> group()static <T extends Group>
GroupMatcher<T> A matcher that matches any group; synonymous withgroup()but its argument is used to set the matcher type.static <T extends Group>
GroupMatcher<T> groupNamed(String name) static <T extends PermittedGroup>
PermittedGroupMatcher<T> static <T extends User>
UserMatcher<T> user()static <T extends User>
UserMatcher<T> A matcher that matches any user; synonymous withuser()but its argument is used to set the matcher type.static <T extends User>
UserMatcher<T>
-
Constructor Details
-
CrowdMatchers
public CrowdMatchers()
-
-
Method Details
-
user
- Type Parameters:
T- type of user, to avoid casting- Returns:
- a matcher which matches any user
- See Also:
-
user
A matcher that matches any user; synonymous withuser()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
- Type Parameters:
T- type of user, to avoid casting- Returns:
- a matcher which matches a user with the given name
- See Also:
-
group
- Type Parameters:
T- type of group, to avoid casting- Returns:
- a matcher which matches any group
- See Also:
-
group
A matcher that matches any group; synonymous withgroup()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
- Type Parameters:
T- type of group, to avoid casting- Returns:
- a matcher which matches a group of the given name
- See Also:
-
directoryGroup
-
permittedGroup
-
directory
- Returns:
- a matcher that matches any directory
-
application
- Returns:
- a matcher that matches any application
-
directoryWithId
- 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
-
applicationWithIdThat
public static org.hamcrest.Matcher<Application> applicationWithIdThat(org.hamcrest.Matcher<Long> idMatcher) -
directoryWithName
- 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
- Type Parameters:
T- type of entity with attributes, to avoid casting- Returns:
- a matcher which matches any entity with attributes
- See Also:
-
entityWithAttributes
A matcher that matches any entity with attributes; synonymous withentityWithAttributes()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:
-