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

public class ApplicationMatcher extends org.hamcrest.TypeSafeMatcher<Application>
  • Method Summary

    Modifier and Type
    Method
    Description
    A matcher that matches any application.
    A matcher that matches an application with the given name.
    void
    describeTo(org.hamcrest.Description description)
     
    protected boolean
     
    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.
    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.
    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, matches

    Methods inherited from class org.hamcrest.BaseMatcher

    _dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • application

      public static ApplicationMatcher application()
      A matcher that matches any application.
      Returns:
      a matcher which matches any application
    • applicationNamed

      public static ApplicationMatcher applicationNamed(String name)
      A matcher that matches an application with the given name.
      Returns:
      a matcher which matches an application with the given name.
    • withNameMatching

      public ApplicationMatcher 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. 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

      public ApplicationMatcher 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. 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

      public ApplicationMatcher 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. 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

      protected boolean matchesSafely(Application item)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<Application>
    • describeTo

      public void describeTo(org.hamcrest.Description description)