Skip to content

Commit

Permalink
Add subfolder to test that
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Oct 29, 2024
1 parent 04d19b1 commit 16dc92f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class FileManagerTest {
val testFileOne = File(testOneDir, "Test File 1.txt")
val testFileTwo = File(testOneDir, "Test File 2.txt")

val subFolder = File(testOneDir, "Subfolder")

val testFileThree = File(subFolder, "Test File 3.txt")

assertTrue(fileDir.exists())
assertTrue(fileDir.isDirectory)
assertNotNull(fileDir.listFiles())
Expand All @@ -39,7 +43,7 @@ class FileManagerTest {
assertTrue(testOneDir.exists())
assertTrue(testOneDir.isDirectory)
assertNotNull(testOneDir.listFiles())
assertEquals(testOneDir.listFiles()!!.size, 2)
assertEquals(testOneDir.listFiles()!!.size, 3)

assertTrue(testFileOne.exists())
assertFalse(testFileOne.isDirectory)
Expand All @@ -48,5 +52,14 @@ class FileManagerTest {
assertTrue(testFileTwo.exists())
assertFalse(testFileTwo.isDirectory)
assertEquals(testFileTwo.readText(), "This file is used to test the FileManager.\r\n")

assertTrue(subFolder.exists())
assertTrue(subFolder.isDirectory)
assertNotNull(subFolder.listFiles())
assertEquals(subFolder.listFiles()!!.size, 1)

assertTrue(testFileThree.exists())
assertFalse(testFileThree.isDirectory)
assertEquals(testFileThree.readText(), "A third test file for the FileManagerTest.\r\n")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A third test file for the FileManagerTest.

0 comments on commit 16dc92f

Please sign in to comment.