You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/25 22:41:53 UTC
[commons-io] branch master updated: Add missing RegexFileFilter tests
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
The following commit(s) were added to refs/heads/master by this push:
new 7a3df40b Add missing RegexFileFilter tests
7a3df40b is described below
commit 7a3df40b4383150b334f521ebb5dbf7e4f44ea9c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jul 25 18:41:47 2022 -0400
Add missing RegexFileFilter tests
---
.../java/org/apache/commons/io/filefilter/RegexFileFilterTest.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTest.java b/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTest.java
index dc0c094d..ee95fff1 100644
--- a/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTest.java
+++ b/src/test/java/org/apache/commons/io/filefilter/RegexFileFilterTest.java
@@ -16,9 +16,10 @@
*/
package org.apache.commons.io.filefilter;
-import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.File;
import java.io.IOException;
@@ -52,6 +53,8 @@ public class RegexFileFilterTest {
assertEquals(expected, filter.accept(file),
"Filter(File, String) " + filter.getClass().getName() + " not " + expected + " for null");
}
+ // Just don't blow up
+ assertNotNull(filter.toString());
}
public void assertFiltering(final IOFileFilter filter, final Path path, final boolean expected) {
@@ -69,6 +72,8 @@ public class RegexFileFilterTest {
assertEquals(expectedFileVisitResult, filter.accept(path, null),
"Filter(Path, Path) " + filter.getClass().getName() + " not " + expectedFileVisitResult + " for null");
}
+ // Just don't blow up
+ assertNotNull(filter.toString());
}
private RegexFileFilter assertSerializable(final RegexFileFilter serializable) throws IOException {