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 20:26:52 UTC
[commons-io] branch master updated: Add missing AccumulatorPathVisitor test
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 e1f2f4a7 Add missing AccumulatorPathVisitor test
e1f2f4a7 is described below
commit e1f2f4a70352b0eb1388ac0b6cb320413100b5bc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Jul 25 16:26:47 2022 -0400
Add missing AccumulatorPathVisitor test
---
.../apache/commons/io/file/AccumulatorPathVisitorTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/test/java/org/apache/commons/io/file/AccumulatorPathVisitorTest.java b/src/test/java/org/apache/commons/io/file/AccumulatorPathVisitorTest.java
index 69d0e5cd..b768eddc 100644
--- a/src/test/java/org/apache/commons/io/file/AccumulatorPathVisitorTest.java
+++ b/src/test/java/org/apache/commons/io/file/AccumulatorPathVisitorTest.java
@@ -44,6 +44,7 @@ import org.apache.commons.io.filefilter.DirectoryFileFilter;
import org.apache.commons.io.filefilter.EmptyFileFilter;
import org.apache.commons.io.filefilter.PathVisitorFileFilter;
import org.apache.commons.io.function.IOBiFunction;
+import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
@@ -76,6 +77,16 @@ public class AccumulatorPathVisitorTest {
@TempDir
Path tempDirPath;
+ @Test
+ public void test0ArgConstructor() throws IOException {
+ final AccumulatorPathVisitor accPathVisitor = new AccumulatorPathVisitor();
+ final PathVisitorFileFilter countingFileFilter = new PathVisitorFileFilter(accPathVisitor);
+ Files.walkFileTree(tempDirPath, new AndFileFilter(countingFileFilter, DirectoryFileFilter.INSTANCE, EmptyFileFilter.EMPTY));
+ assertCounts(0, 0, 0, accPathVisitor.getPathCounters());
+ assertEquals(1, accPathVisitor.getDirList().size());
+ assertTrue(accPathVisitor.getFileList().isEmpty());
+ }
+
/**
* Tests an empty folder.
*/