-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCommandPluginTestBase.java
More file actions
36 lines (28 loc) · 862 Bytes
/
CommandPluginTestBase.java
File metadata and controls
36 lines (28 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package net.onelitefeather.labyrinth.commands;
import net.onelitefeather.labyrinth.Labyrinth;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.mockbukkit.mockbukkit.MockBukkit;
import org.mockbukkit.mockbukkit.ServerMock;
public abstract class CommandPluginTestBase {
protected @NotNull ServerMock server;
protected Labyrinth plugin;
public static class MockLabyrinthPlugin extends Labyrinth {
@Override
public void onEnable() {
}
@Override
public void onDisable() {
}
}
@BeforeEach
void setUp() {
server = MockBukkit.mock();
plugin = MockBukkit.load(CommandPluginTestBase.MockLabyrinthPlugin.class);
}
@AfterEach
void tearDown() {
MockBukkit.unmock();
}
}