File tree 1 file changed +17
-8
lines changed
eo-maven-plugin/src/test/java/org/eolang/maven
1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 23
23
final class WalkTest {
24
24
25
25
@ Test
26
- void findsFiles (@ Mktmp final Path temp ) throws Exception {
27
- new HmBase (temp ).save ("" , Paths .get ("foo/hello/0.1/EObar/x.bin" ));
28
- new HmBase (temp ).save ("" , Paths .get ("EOxxx/bar" ));
26
+ void findsFilesMatchingGlobPattern (@ Mktmp final Path temp ) throws Exception {
27
+ final String nonMatchingFile = "foo/hello/0.1/EObar/x.bin" ;
28
+ final String matchingFile = "EOxxx/bar" ;
29
+ final String includePattern = "EO**/*" ;
30
+ final int expectedCount = 1 ;
31
+
32
+ new HmBase (temp ).save ("" , Paths .get (nonMatchingFile ));
33
+ new HmBase (temp ).save ("" , Paths .get (matchingFile ));
34
+
29
35
MatcherAssert .assertThat (
30
- "Walk is not iterable with more than 1 item, but it must be" ,
31
- new Walk (temp ).includes (new ListOf <>("EO**/*" )),
32
- Matchers .iterableWithSize (1 )
36
+ String .format (
37
+ "Expected %d file(s) matching pattern '%s'" ,
38
+ expectedCount ,
39
+ includePattern
40
+ ),
41
+ new Walk (temp ).includes (new ListOf <>(includePattern )),
42
+ Matchers .iterableWithSize (expectedCount )
33
43
);
34
44
}
35
-
36
- }
45
+ }
You can’t perform that action at this time.
0 commit comments