Class DirectoryGroupMatcher<E extends DirectoryGroup>
java.lang.Object
org.hamcrest.BaseMatcher<E>
org.hamcrest.TypeSafeMatcher<E>
com.atlassian.crowd.test.matchers.DirectoryGroupMatcher<E>
- All Implemented Interfaces:
org.hamcrest.Matcher<E>,org.hamcrest.SelfDescribing
public class DirectoryGroupMatcher<E extends DirectoryGroup>
extends org.hamcrest.TypeSafeMatcher<E>
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryGroupMatcher(org.hamcrest.Matcher<String> nameMatcher, org.hamcrest.Matcher<Long> directoryIdMatcher, org.hamcrest.Matcher<String> directoryNameMatcher) -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(org.hamcrest.Description description) static <T extends DirectoryGroup>
DirectoryGroupMatcher<T> group()A matcher that matches any directoryGroup.static <T extends DirectoryGroup>
DirectoryGroupMatcher<T> A matcher that matches any directoryGroup; synonymous withgroup()but its argument is used to set the matcher type.protected booleanmatchesSafely(E item) Builds a new specialised matcher to match the attributes in the given group exactly; the returned matcher will only match if all this matcher's non-group-attribute constraints are matched AND all of the matcher's group-attributes are matched.withDirectoryName(String directoryName) Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
DirectoryGroupMatcher
-
-
Method Details
-
group
A matcher that matches any directoryGroup.- Type Parameters:
T- type of directoryGroup, to avoid casting- Returns:
- a matcher which matches any directoryGroup
-
group
A matcher that matches any directoryGroup; synonymous withgroup()but its argument is used to set the matcher type.- Type Parameters:
T- type of directoryGroup, to avoid casting- Parameters:
type- type of directoryGroup, to avoid casting (this type is not checked at runtime).- Returns:
- a matcher which matches any directoryGroup
-
matching
Builds a new specialised matcher to match the attributes in the given group exactly; the returned matcher will only match if all this matcher's non-group-attribute constraints are matched AND all of the matcher's group-attributes are matched. Any existing group attribute constraints will be discarded.- Parameters:
group- group which must equivalent to the directory group on all matchers- Returns:
- a matcher will only match if all this matcher's non-group-attribute constraints are matched AND all of the matcher's group-attributes are matched
-
withDirectoryName
-
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeMatcher<E extends DirectoryGroup>
-
describeTo
public void describeTo(org.hamcrest.Description description)
-