File tree 1 file changed +12
-8
lines changed
eo-maven-plugin/src/test/java/org/eolang/maven
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 7
7
import com .yegor256 .Mktmp ;
8
8
import com .yegor256 .MktmpResolver ;
9
9
import java .nio .file .Path ;
10
- import java .nio .file .Paths ;
11
10
import org .cactoos .list .ListOf ;
12
11
import org .hamcrest .MatcherAssert ;
13
12
import org .hamcrest .Matchers ;
23
22
final class WalkTest {
24
23
25
24
@ 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" ));
25
+ void findsFilesMatchingGlobPattern (@ Mktmp final Path temp ) throws Exception {
26
+ new Saved ("" , temp .resolve ("foo/hello/0.1/EObar/x.bin" )).value ();
27
+ new Saved ("" , temp .resolve ("EOxxx/bar" )).value ();
28
+ final String pattern = "EO**/*" ;
29
+ final int count = 1 ;
29
30
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 )
31
+ String .format (
32
+ "Expected %d file(s) matching pattern '%s'" ,
33
+ count ,
34
+ pattern
35
+ ),
36
+ new Walk (temp ).includes (new ListOf <>(pattern )),
37
+ Matchers .iterableWithSize (count )
33
38
);
34
39
}
35
-
36
40
}
You can’t perform that action at this time.
0 commit comments