mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
Add fuse test. Also made some modification to allow the test to work
This commit is contained in:
parent
2008b41b09
commit
99a7829990
15 changed files with 514 additions and 52 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue