Class FileExists
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Path>
com._1c.g5.v8.dt.testing.matchers.FileExists
- All Implemented Interfaces:
org.hamcrest.Matcher<Path>
,org.hamcrest.SelfDescribing
Matcher that matches if the examined
Path
does or does not exist.-
Method Summary
Modifier and TypeMethodDescriptionprotected void
describeMismatchSafely
(Path item, org.hamcrest.Description description) void
describeTo
(org.hamcrest.Description description) static org.hamcrest.Matcher<Path>
exists()
Creates a matcher that matches if the examinedPath
exists.protected boolean
matchesSafely
(Path path) static org.hamcrest.Matcher<Path>
Creates a matcher that matches if the examinedPath
does not exist.Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, matches
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString
-
Method Details
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatchSafely
- Overrides:
describeMismatchSafely
in classorg.hamcrest.TypeSafeMatcher<Path>
-
matchesSafely
- Specified by:
matchesSafely
in classorg.hamcrest.TypeSafeMatcher<Path>
-
exists
Creates a matcher that matches if the examinedPath
exists.For example:
assertThat(Paths.get("path/to/some/file"), exists())
-
notExists
Creates a matcher that matches if the examinedPath
does not exist.For example:
assertThat(Paths.get("path/to/some/file"), notExists())
-