Skip to content

Commit

Permalink
remove unused import and rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-philippe-martin committed Jan 13, 2017
1 parent 10aa070 commit 034ab6b
Showing 1 changed file with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.cloud.storage.StorageOptions;
import com.google.common.collect.ImmutableList;
import com.google.common.testing.EqualsTester;
import com.google.common.testing.NullPointerTester;

Expand Down Expand Up @@ -166,18 +165,18 @@ public void testListFiles() throws IOException {
public void testMatcher() throws IOException {
try (FileSystem fs = CloudStorageFileSystem.forBucket("bucket")) {
String pattern1 = "glob:*.java";
PathMatcher matcher1 = fs.getPathMatcher(pattern1);
PathMatcher javaFileMatcher = fs.getPathMatcher(pattern1);
String pattern2 = "glob:*.{java,text}";
PathMatcher matcher2 = fs.getPathMatcher(pattern2);

assertMatches(fs, matcher1, "a.java", true);
assertMatches(fs, matcher1, "a.text", false);
assertMatches(fs, matcher1, "folder/c.java", true);
assertMatches(fs, matcher1, "d", false);
assertMatches(fs, matcher2, "a.java", true);
assertMatches(fs, matcher2, "a.text", true);
assertMatches(fs, matcher2, "folder/c.java", true);
assertMatches(fs, matcher2, "d", false);
PathMatcher javaAndTextFileMatcher = fs.getPathMatcher(pattern2);

assertMatches(fs, javaFileMatcher, "a.java", true);
assertMatches(fs, javaFileMatcher, "a.text", false);
assertMatches(fs, javaFileMatcher, "folder/c.java", true);
assertMatches(fs, javaFileMatcher, "d", false);
assertMatches(fs, javaAndTextFileMatcher, "a.java", true);
assertMatches(fs, javaAndTextFileMatcher, "a.text", true);
assertMatches(fs, javaAndTextFileMatcher, "folder/c.java", true);
assertMatches(fs, javaAndTextFileMatcher, "d", false);
}
}

Expand Down

0 comments on commit 034ab6b

Please sign in to comment.