Class ApplicationMatcher
java.lang.Object
org.hamcrest.BaseMatcher<Application>
org.hamcrest.TypeSafeMatcher<Application>
com.atlassian.crowd.test.matchers.ApplicationMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<Application>,org.hamcrest.SelfDescribing
-
Method Summary
Modifier and TypeMethodDescriptionstatic ApplicationMatcherA matcher that matches any application.static ApplicationMatcherapplicationNamed(String name) A matcher that matches an application with the given name.voiddescribeTo(org.hamcrest.Description description) protected booleanmatchesSafely(Application item) withNameMatching(org.hamcrest.Matcher<String> nameMatcher) Builds a new specialised matcher to match on application name; the returned matcher will only match if all this matcher's non-name constraints are matched AND the given matcher matches the application's name.withNameOf(String name) Builds a new specialised matcher to match the given application name exactly; the returned matcher will only match if all this matcher's non-name constraints are matched AND the given string is equal to the application's name.withRemoteAddressesMatching(org.hamcrest.Matcher<Set<RemoteAddress>> remoteAddressesMatcher) Builds a new specialised matcher to match on remote addresses; the returned matcher will only match if all this matcher's non-remote-address constraints are matched AND the given matcher matches the application's remote addresses.withRemoteAddressOf(Set<RemoteAddress> remoteAddresses) Builds a new specialised matcher to match the given application remote addresses exactly; the returned matcher will only match if all this matcher's non-remote-address constraints are matched AND the given set is equal to the application's remote addresses.Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Method Details
-
application
A matcher that matches any application.- Returns:
- a matcher which matches any application
-
applicationNamed
A matcher that matches an application with the given name.- Returns:
- a matcher which matches an application with the given name.
-
withNameMatching
Builds a new specialised matcher to match on application name; the returned matcher will only match if all this matcher's non-name constraints are matched AND the given matcher matches the application's name. Any existing name constraint is discarded.- Parameters:
nameMatcher- matcher which must match the application's name in order for this matcher to match- Returns:
- a matcher will only match if all this matcher's non-name constraints are matched AND the given matcher matches the application's name
-
withNameOf
Builds a new specialised matcher to match the given application name exactly; the returned matcher will only match if all this matcher's non-name constraints are matched AND the given string is equal to the application's name. Any existing name constraint is discarded.- Parameters:
name- string which must equal the application's name in order for this matcher to match- Returns:
- a matcher will only match if all this matcher's non-name constraints are matched AND the given string is equal to the application's name
-
withRemoteAddressesMatching
public ApplicationMatcher withRemoteAddressesMatching(org.hamcrest.Matcher<Set<RemoteAddress>> remoteAddressesMatcher) Builds a new specialised matcher to match on remote addresses; the returned matcher will only match if all this matcher's non-remote-address constraints are matched AND the given matcher matches the application's remote addresses. Any existing remote address constraint is discarded.- Parameters:
remoteAddressesMatcher- matcher which must match the application's remote addresses in order for this matcher to match- Returns:
- a matcher will only match if all this matcher's non-remote-addresses constraints are matched AND the given matcher matches the application's remote addresses
-
withRemoteAddressOf
Builds a new specialised matcher to match the given application remote addresses exactly; the returned matcher will only match if all this matcher's non-remote-address constraints are matched AND the given set is equal to the application's remote addresses. Any existing remote address constraint is discarded.- Parameters:
remoteAddresses- set which must equal the application's remote address in order for this matcher to match- Returns:
- a matcher will only match if all this matcher's non-remote-address constraints are matched AND the given set is equal to the application's remote address
-
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeMatcher<Application>
-
describeTo
public void describeTo(org.hamcrest.Description description)
-