garydgregory commented on a change in pull request #31: DirectoryUtils - 
isEqual to compare directories
URL: https://github.com/apache/commons-io/pull/31#discussion_r350256878
 
 

 ##########
 File path: 
src/test/java/org/apache/commons/io/DirectoryUtilsTestCase_Simple.java
 ##########
 @@ -0,0 +1,66 @@
+package org.apache.commons.io;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+
+import org.junit.Test;
+
+/**
+ * This is used to test DirectoryUtils for correctness with flat directories
+ *
+ * @see DirectoryUtils
+ */
+public class DirectoryUtilsTestCase_Simple {
+
+    String basePath = "src/test/resources/DirectoryUtils_equal/simple/";
+
+    @Test
+    public void compare_self() throws IOException {
+        boolean checkFileContent = false;
+        Path directory = FileSystems.getDefault().getPath(basePath + 
"directory");
+        Path compareDirectory = FileSystems.getDefault().getPath(basePath + 
"directory");
+
+        assertTrue(DirectoryUtils.isEqual(directory, compareDirectory, 
checkFileContent));
 
 Review comment:
   All tests method are incomplete and should be something like:
   ```
           assertTrue(DirectoryUtils.isEqual(directory, compareDirectory, 
checkFileContent));
           assertTrue(DirectoryUtils.isEqual(directory, directory, 
checkFileContent));
           assertTrue(DirectoryUtils.isEqual(compareDirectory, directory, 
checkFileContent));
           assertTrue(DirectoryUtils.isEqual(compareDirectory, 
compareDirectory, checkFileContent));
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to