Class ResourceIteratorPathMatcher

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

    public class ResourceIteratorPathMatcher
    extends org.hamcrest.TypeSafeMatcher<Iterator<org.apache.sling.api.resource.Resource>>
    Ensures an iterator of resources has exactly the given list of paths in the given order.
    • Constructor Detail

      • ResourceIteratorPathMatcher

        public ResourceIteratorPathMatcher​(List<String> paths)
    • Method Detail

      • describeTo

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

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

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