Class PathEndsWith

java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Path>
com._1c.g5.v8.dt.testing.matchers.PathEndsWith
All Implemented Interfaces:
org.hamcrest.Matcher<Path>, org.hamcrest.SelfDescribing

public class PathEndsWith extends org.hamcrest.TypeSafeMatcher<Path>
Matcher that matches if the examined Path ends with the given path part.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    describeMismatchSafely(Path item, org.hamcrest.Description description)
     
    void
    describeTo(org.hamcrest.Description description)
     
    static org.hamcrest.Matcher<Path>
    Creates a matcher that matches if the examined Path ends with the given path part.
    static org.hamcrest.Matcher<Path>
    endsWith(Path part)
    Creates a matcher that matches if the examined Path ends with the given path part.
    protected boolean
     

    Methods inherited from class org.hamcrest.TypeSafeMatcher

    describeMismatch, 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
  • Method Details

    • describeTo

      public void describeTo(org.hamcrest.Description description)
    • describeMismatchSafely

      protected void describeMismatchSafely(Path item, org.hamcrest.Description description)
      Overrides:
      describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<Path>
    • matchesSafely

      protected boolean matchesSafely(Path path)
      Specified by:
      matchesSafely in class org.hamcrest.TypeSafeMatcher<Path>
    • endsWith

      public static org.hamcrest.Matcher<Path> endsWith(Path part)
      Creates a matcher that matches if the examined Path ends with the given path part.

      For example:

       assertThat(Paths.get("path/to/some/file"), endsWith(Paths.get("some/file")))
       
    • endsWith

      public static org.hamcrest.Matcher<Path> endsWith(String part)
      Creates a matcher that matches if the examined Path ends with the given path part.

      For example:

       assertThat(Paths.get("path/to/some/file"), endsWith("some/file"))