Skip to content

Commit

Permalink
chore: 1 more test
Browse files Browse the repository at this point in the history
  • Loading branch information
ProdPreva1l committed Mar 10, 2025
1 parent 9aff917 commit 51a83d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 0 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ allprojects {

tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("started", "passed", "failed", "skipped", "standardOut", "standardError")
showStandardStreams = true
}
}

tasks.withType<ShadowJar> {
Expand Down
13 changes: 6 additions & 7 deletions src/test/java/info/preva1l/hooker/HookerTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,17 @@
import info.preva1l.hooker.example.hooks.LateHook;
import info.preva1l.hooker.example.hooks.OnEnableHook;
import info.preva1l.hooker.example.hooks.OnLoadHook;
import org.bukkit.event.server.PluginDisableEvent;
import org.junit.jupiter.api.*;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

/**
* Created on 9/03/2025
*
* @author Preva1l
*/
@DisplayName("Hooker Tests")
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class HookerTests {
private static ServerMock serverMock;
private static MyPlugin plugin;
Expand All @@ -38,21 +35,24 @@ public static void unload() {
MockBukkit.unmock();
}

@Order(1)
@Test
@DisplayName("Test Plugin Enables")
public void testPluginEnables() {
Assertions.assertTrue(plugin.isEnabled());
}

@Test
@DisplayName("Test Hook Gets Loaded On Load")
public void testLoadingOnLoad() {
Assertions.assertTrue(Hooker.getHook(OnLoadHook.class).isPresent());
}

@Order(2)
@Test
@DisplayName("Test Hook Gets Loaded On Enable")
public void testLoadingOnEnable() {
Assertions.assertTrue(Hooker.getHook(OnEnableHook.class).isPresent());
}

@Order(3)
@Test
@DisplayName("Test Hook Reloading")
public void testReloadHooks() {
Expand All @@ -71,7 +71,6 @@ public void testReloadHooks() {
});
}

@Order(4)
@Test
@DisplayName("Test Hooks Get Disabled")
public void testHooksGetDisabled() {
Expand Down

0 comments on commit 51a83d4

Please sign in to comment.