com.atlassian.crowd.test.matchers
Class DirectoryMatcher

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.hamcrest.TypeSafeMatcher<com.atlassian.crowd.embedded.api.Directory>
          extended by com.atlassian.crowd.test.matchers.DirectoryMatcher
All Implemented Interfaces:
org.hamcrest.Matcher<com.atlassian.crowd.embedded.api.Directory>, org.hamcrest.SelfDescribing

public class DirectoryMatcher
extends org.hamcrest.TypeSafeMatcher<com.atlassian.crowd.embedded.api.Directory>


Constructor Summary
DirectoryMatcher(org.hamcrest.Matcher<String> implementationClassMatcher)
           
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
static DirectoryMatcher directory()
          A matcher that matches any directory.
protected  boolean matchesSafely(com.atlassian.crowd.embedded.api.Directory item)
           
 DirectoryMatcher withImplementationClassMatching(org.hamcrest.Matcher<String> externalIdMatcher)
          Builds a new specialised matcher to match on the implementation class.
 DirectoryMatcher withImplementationClassOf(Class implementationClass)
          Builds a new specialised matcher to match the given implementation class.
 
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, 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

DirectoryMatcher

public DirectoryMatcher(@Nullable
                        org.hamcrest.Matcher<String> implementationClassMatcher)
Method Detail

directory

public static DirectoryMatcher directory()
A matcher that matches any directory.

Returns:
a matcher which matches any directory

withImplementationClassMatching

public DirectoryMatcher withImplementationClassMatching(org.hamcrest.Matcher<String> externalIdMatcher)
Builds a new specialised matcher to match on the implementation class.

Parameters:
externalIdMatcher - matcher which must match the directory's implementation class in order for this matcher to match
Returns:
a matcher

withImplementationClassOf

public DirectoryMatcher withImplementationClassOf(Class implementationClass)
Builds a new specialised matcher to match the given implementation class.

Parameters:
implementationClass - the provided implementation class must equal the directory's implementation class in order for this matcher to match
Returns:
a matcher

matchesSafely

protected boolean matchesSafely(com.atlassian.crowd.embedded.api.Directory item)
Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<com.atlassian.crowd.embedded.api.Directory>

describeTo

public void describeTo(org.hamcrest.Description description)


Copyright © 2014 Atlassian. All Rights Reserved.