Class ResourceNameMatcher

  • All Implemented Interfaces:
    org.hamcrest.Matcher<org.apache.sling.api.resource.Resource>, org.hamcrest.SelfDescribing

    public class ResourceNameMatcher
    extends org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>
    Matcher which matches whenever the name of the given resource is equal to the name given in the constructor.
    • Constructor Detail

      • ResourceNameMatcher

        public ResourceNameMatcher​(String name)
    • Method Detail

      • describeTo

        public void describeTo​(org.hamcrest.Description description)
      • matchesSafely

        protected boolean matchesSafely​(org.apache.sling.api.resource.Resource resource)
        Specified by:
        matchesSafely in class org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>
      • describeMismatchSafely

        protected void describeMismatchSafely​(org.apache.sling.api.resource.Resource resource,
                                              org.hamcrest.Description mismatchDescription)
        Overrides:
        describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<org.apache.sling.api.resource.Resource>