Polish CLI Jar generation

This commit is contained in:
Phillip Webb
2014-01-29 17:18:11 -08:00
parent d648603634
commit 208bf8fc96
9 changed files with 278 additions and 252 deletions

View File

@@ -29,7 +29,9 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
/**
* @author awilkinson
* Tests for {@link ResourceMatcher}.
*
* @author Andy Wilkinson
*/
public class ResourceMatcherTests {
@@ -38,22 +40,21 @@ public class ResourceMatcherTests {
@Test
public void nonExistentRoot() throws IOException {
List<MatchedResource> matchedResources = this.resourceMatcher
.matchResources(Arrays.asList(new File("does-not-exist")));
List<MatchedResource> matchedResources = this.resourceMatcher.find(Arrays
.asList(new File("does-not-exist")));
assertEquals(0, matchedResources.size());
}
@Test
public void resourceMatching() throws IOException {
List<MatchedResource> matchedResources = this.resourceMatcher
.matchResources(Arrays.asList(new File(
"src/test/resources/resource-matcher/one"), new File(
List<MatchedResource> matchedResources = this.resourceMatcher.find(Arrays.asList(
new File("src/test/resources/resource-matcher/one"), new File(
"src/test/resources/resource-matcher/two"), new File(
"src/test/resources/resource-matcher/three")));
System.out.println(matchedResources);
List<String> paths = new ArrayList<String>();
for (MatchedResource resource : matchedResources) {
paths.add(resource.getPath());
paths.add(resource.getName());
}
assertEquals(6, paths.size());