-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8782752
commit f0adda7
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...st/kotlin/foundation/esoteric/minecraft/plugins/library/pack/resource/ResourcePackTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package foundation.esoteric.minecraft.plugins.library.pack.resource | ||
|
||
import be.seeseemelk.mockbukkit.MockBukkit | ||
import foundation.esoteric.minecraft.plugins.library.TestPlugin | ||
import java.io.File | ||
import kotlin.test.AfterTest | ||
import kotlin.test.BeforeTest | ||
import kotlin.test.Test | ||
import kotlin.test.assertTrue | ||
|
||
class ResourcePackTest { | ||
|
||
private var plugin: TestPlugin? = null | ||
|
||
@BeforeTest fun mockResourcePackPlugin() { | ||
MockBukkit.mock() | ||
plugin = MockBukkit.load(TestPlugin::class.java) | ||
} | ||
|
||
@Test fun resourcePackSavingWorks() { | ||
val resourcePackFolder = File(plugin!!.dataFolder, "TestPluginResourcePack.zip") | ||
assertTrue(resourcePackFolder.exists()) | ||
} | ||
|
||
@AfterTest fun unmockResourcePackPlugin() { | ||
MockBukkit.unmock() | ||
} | ||
} |