INT-1520 rename AntPattern* to AntPath* to match collaborator class name
This commit is contained in:
@@ -8,12 +8,12 @@ import java.io.File;
|
||||
/**
|
||||
* @author Iwein Fuld
|
||||
*/
|
||||
public class AntPatternFileListFilter extends AbstractEntryListFilter<File> {
|
||||
public class AntPathFileListFilter extends AbstractEntryListFilter<File> {
|
||||
|
||||
private final AntPathMatcher matcher = new AntPathMatcher();
|
||||
private final String path;
|
||||
|
||||
public AntPatternFileListFilter(String path) {
|
||||
public AntPathFileListFilter(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@@ -12,21 +12,21 @@ import static org.junit.Assert.assertThat;
|
||||
*
|
||||
* Minimal test set to ensure AntPathMatcher is used correctly.
|
||||
*/
|
||||
public class AntPatternFileListFilterTest {
|
||||
public class AntPathFileListFilterTest {
|
||||
|
||||
@Test
|
||||
public void shouldMatchExactly() {
|
||||
assertThat(new AntPatternFileListFilter("foo/bar").accept(new File("foo/bar")), is(true));
|
||||
assertThat(new AntPathFileListFilter("foo/bar").accept(new File("foo/bar")), is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldMatchQuestionMark() {
|
||||
assertThat(new AntPatternFileListFilter("*/bar").accept(new File("foo/bar")), is(true));
|
||||
assertThat(new AntPathFileListFilter("*/bar").accept(new File("foo/bar")), is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldMatchWildcard() {
|
||||
assertThat(new AntPatternFileListFilter("foo/ba?").accept(new File("foo/bar")), is(true));
|
||||
assertThat(new AntPathFileListFilter("foo/ba?").accept(new File("foo/bar")), is(true));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user