Add fuse test. Also made some modification to allow the test to work

This commit is contained in:
alexcrea 2024-10-24 10:29:29 +02:00
parent 2008b41b09
commit 99a7829990
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
15 changed files with 514 additions and 52 deletions

View file

@ -1,44 +1,15 @@
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.Assertions;
import org.junit.jupiter.api.Test;
import xyz.alexcrea.cuanvil.DefaultCustomAnvilTest;
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();
}
public class CustomAnvilTests extends DefaultCustomAnvilTest {
@Test
public void simpleInitTest() {
// Continue initialization of the plugin
server.getScheduler().performOneTick();
Assertions.assertNotNull(server);
Assertions.assertNotNull(plugin);
}
}