mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Add basic test
This commit is contained in:
parent
c42140a45a
commit
2008b41b09
3 changed files with 114 additions and 3 deletions
44
src/test/java/io/delilaheve/CustomAnvilTests.java
Normal file
44
src/test/java/io/delilaheve/CustomAnvilTests.java
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
package io.delilaheve;
|
||||
|
||||
import be.seeseemelk.mockbukkit.MockBukkit;
|
||||
import be.seeseemelk.mockbukkit.ServerMock;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class CustomAnvilTests {
|
||||
|
||||
private ServerMock server;
|
||||
|
||||
private CustomAnvil plugin;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
|
||||
// Start the mock server
|
||||
server = MockBukkit.mock();
|
||||
|
||||
// Load your plugin
|
||||
plugin = MockBukkit.load(CustomAnvil.class);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() {
|
||||
// Stop the mock server
|
||||
MockBukkit.unmock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void simpleInitTest() {
|
||||
// Continue initialization of the plugin
|
||||
server.getScheduler().performOneTick();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue