|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hamcrest.BaseMatcher<T> org.hamcrest.TypeSafeMatcher<E> com.atlassian.crowd.test.matchers.GroupMatcher<E>
public class GroupMatcher<E extends Group>
Constructor Summary | |
---|---|
GroupMatcher(org.hamcrest.Matcher<String> nameMatcher,
org.hamcrest.Matcher<Boolean> activeMatcher)
|
Method Summary | ||
---|---|---|
void |
describeTo(org.hamcrest.Description description)
|
|
static
|
group()
A matcher that matches any group. |
|
static
|
group(Class<T> type)
A matcher that matches any group; synonymous with group() but its argument is used to set the matcher type. |
|
static
|
groupNamed(String name)
A matcher that matches a group with the given name. |
|
protected boolean |
matchesSafely(E item)
|
|
GroupMatcher<E> |
withActive(boolean active)
Builds a new specialised matcher to match the given active status; the returned matcher will only match if all this matcher's non-group name constraints are matched AND the given status is equal to the group's active status. |
|
GroupMatcher<E> |
withNameMatching(org.hamcrest.Matcher<String> nameMatcher)
Builds a new specialised matcher to match on group name; the returned matcher will only match if all this matcher's non-group-name constraints are matched AND the given matcher matches the group's name. |
|
GroupMatcher<E> |
withNameOf(String name)
Builds a new specialised matcher to match the given group name exactly; the returned matcher will only match if all this matcher's non-group-name constraints are matched AND the given string is equal to the group's name. |
Methods inherited from class org.hamcrest.TypeSafeMatcher |
---|
matches |
Methods inherited from class org.hamcrest.BaseMatcher |
---|
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GroupMatcher(@Nullable org.hamcrest.Matcher<String> nameMatcher, @Nullable org.hamcrest.Matcher<Boolean> activeMatcher)
Method Detail |
---|
public static <T extends Group> GroupMatcher<T> group()
T
- type of group, to avoid casting
public static <T extends Group> GroupMatcher<T> group(Class<T> type)
group()
but its argument is used to set the matcher type.
T
- type of group, to avoid castingtype
- type of group, to avoid casting (this type is not checked at runtime).
public static <T extends Group> GroupMatcher<T> groupNamed(String name)
T
- type of group, to avoid casting
public GroupMatcher<E> withNameMatching(org.hamcrest.Matcher<String> nameMatcher)
nameMatcher
- matcher which must match the group's name in order for this matcher to match
public GroupMatcher<E> withNameOf(String name)
name
- string which must equal the group's name in order for this matcher to match
public GroupMatcher<E> withActive(boolean active)
active
- the status must equal the group's status (as per
Group.isActive()
) in order for this matcher to match
protected boolean matchesSafely(E item)
matchesSafely
in class org.hamcrest.TypeSafeMatcher<E extends Group>
public void describeTo(org.hamcrest.Description description)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |