refactor: drop lolib, add own scheduler, inventory GUI and void generator
This commit is contained in:
parent
cc521dc284
commit
7e227e39a4
47 changed files with 708 additions and 113 deletions
|
|
@ -0,0 +1,22 @@
|
|||
package dev.loki.loparkour.scheduler;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
class SchedulerTest {
|
||||
|
||||
@Test
|
||||
void testNoFoliaOnPlainJvm() {
|
||||
assertFalse(Scheduler.isFolia(), "Folia server classes are absent in the test JVM");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testInstancesAreCachedPerPlugin() {
|
||||
final Plugin plugin = Mockito.mock(Plugin.class);
|
||||
assertSame(Scheduler.get(plugin), Scheduler.get(plugin), "the same plugin must reuse one scheduler");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue