diff --git a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt index 7e88374..a9fb550 100644 --- a/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt +++ b/lib/src/test/kotlin/foundation/esoteric/minecraft/plugins/library/file/FileManagerTest.kt @@ -8,25 +8,22 @@ import kotlin.test.* class FileManagerTest { private lateinit var plugin: TestPlugin - private lateinit var fileManager: FileManager @BeforeTest fun mockFileManager() { MockBukkit.mock() plugin = MockBukkit.load(TestPlugin::class.java) - fileManager = FileManager(plugin) } @Test fun savingFolderWorks() { - fileManager.saveResourceFolder("file/FileManagerTest/1") + plugin.fileManager.saveResourceFolder("file/FileManagerTest") val fileDir = File(plugin.dataFolder, "file") val fileManagerTestDir = File(fileDir, "FileManagerTest") - val testOneDir = File(fileManagerTestDir, "1") - val testFileOne = File(testOneDir, "Test File 1.txt") - val testFileTwo = File(testOneDir, "Test File 2.txt") + val testFileOne = File(fileManagerTestDir, "Test File 1.txt") + val testFileTwo = File(fileManagerTestDir, "Test File 2.txt") - val subFolder = File(testOneDir, "Subfolder") + val subFolder = File(fileManagerTestDir, "Subfolder") val testFileThree = File(subFolder, "Test File 3.txt") @@ -38,12 +35,7 @@ class FileManagerTest { assertTrue(fileManagerTestDir.exists()) assertTrue(fileManagerTestDir.isDirectory) assertNotNull(fileManagerTestDir.listFiles()) - assertEquals(fileManagerTestDir.listFiles()!!.size, 1) - - assertTrue(testOneDir.exists()) - assertTrue(testOneDir.isDirectory) - assertNotNull(testOneDir.listFiles()) - assertEquals(testOneDir.listFiles()!!.size, 3) + assertEquals(fileManagerTestDir.listFiles()!!.size, 3) assertTrue(testFileOne.exists()) assertFalse(testFileOne.isDirectory) diff --git a/lib/src/test/resources/file/FileManagerTest/1/Subfolder/Test File 3.txt b/lib/src/test/resources/file/FileManagerTest/Subfolder/Test File 3.txt similarity index 100% rename from lib/src/test/resources/file/FileManagerTest/1/Subfolder/Test File 3.txt rename to lib/src/test/resources/file/FileManagerTest/Subfolder/Test File 3.txt diff --git a/lib/src/test/resources/file/FileManagerTest/1/Test File 1.txt b/lib/src/test/resources/file/FileManagerTest/Test File 1.txt similarity index 100% rename from lib/src/test/resources/file/FileManagerTest/1/Test File 1.txt rename to lib/src/test/resources/file/FileManagerTest/Test File 1.txt diff --git a/lib/src/test/resources/file/FileManagerTest/1/Test File 2.txt b/lib/src/test/resources/file/FileManagerTest/Test File 2.txt similarity index 100% rename from lib/src/test/resources/file/FileManagerTest/1/Test File 2.txt rename to lib/src/test/resources/file/FileManagerTest/Test File 2.txt