mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-17 22:29:41 -05:00
test
Former-commit-id: edc413983531f70cae15f0b2a561c837e8719f99
This commit is contained in:
1 parent
197f59f6ee
commit
4fb7da5969
2 files changed
+20
-10
No files matched your search
@@ -1,10 +1,15 @@
|
||||
package org.maxgamer.quickshop.File;
|
||||
|
||||
import be.seeseemelk.mockbukkit.MockBukkit;
|
||||
import org.hamcrest.core.IsEqual;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.llorllale.cactoos.matchers.Assertion;
|
||||
import org.maxgamer.quickshop.QuickShopTest;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class JSONFileTest {
|
||||
|
||||
private QuickShopTest plugin;
|
||||
@@ -18,9 +23,18 @@ class JSONFileTest {
|
||||
json.create();
|
||||
}
|
||||
|
||||
@Test
|
||||
void get() {
|
||||
new Assertion<>(
|
||||
"There is no 'signs.item' path",
|
||||
json.get("signs.item"),
|
||||
new IsEqual<>("{0}")
|
||||
).affirm();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
MockBukkit.unload();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,22 +3,18 @@ package org.maxgamer.quickshop;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public final class QuickShopTest extends JavaPlugin {
|
||||
public class QuickShopTest extends JavaPlugin {
|
||||
|
||||
public QuickShopTest() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected QuickShopTest(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) {
|
||||
super(
|
||||
loader,
|
||||
description,
|
||||
new File("build"),
|
||||
file
|
||||
);
|
||||
public QuickShopTest(@NotNull JavaPluginLoader loader, @NotNull PluginDescriptionFile description,
|
||||
@NotNull File dataFolder, @NotNull File file) {
|
||||
super(loader, description, new File("build"), file);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user