@Test public void shouldContains() throws Exception { Files.write(directory.resolve("file"), "content".getBytes(StandardCharsets.UTF_8)); assertThat(directory, contains("file")); }
@Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(int expectedCount); @Factory static Matcher<Path> hasFilesCount(int expectedCount, String glob); }
PathMatchers { @Factory public static Matcher<Path> contains(String fileName) { return new DirectoryContains(fileName); } PathMatchers(); @Factory static Matcher<Path> contains(String fileName); @Factory static Matcher<Path> isDirectory(); @Factory static Matcher<Path> exists(LinkOption... options); @Factory static Matcher<Path> hasFilesCount(int expectedCount); @Factory static Matcher<Path> hasFilesCount(int expectedCount, String glob);  }