Add basic test

This commit is contained in:
alexcrea 2024-10-23 13:39:17 +02:00
parent c42140a45a
commit 2008b41b09
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
3 changed files with 114 additions and 3 deletions

View 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();
}
}