From be1f31778adc045ab56dc7acbdfabcbcdf3101ea Mon Sep 17 00:00:00 2001 From: marcos Date: Wed, 5 Aug 2026 14:51:28 +0000 Subject: [PATCH] test: add JUnit 5 harness --- pom.xml | 31 +++++++++++++++++++ .../marcospaulo/canalhandia/SanityTest.java | 18 +++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/test/java/dev/marcospaulo/canalhandia/SanityTest.java diff --git a/pom.xml b/pom.xml index 0868175..4489a01 100644 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,21 @@ + + + + + org.junit + junit-bom + 5.11.3 + pom + import + + + + io.papermc.paper @@ -29,6 +44,12 @@ 26.2.build.92-stable provided + + org.junit.jupiter + junit-jupiter + + test + @@ -39,5 +60,15 @@ true + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.4 + + diff --git a/src/test/java/dev/marcospaulo/canalhandia/SanityTest.java b/src/test/java/dev/marcospaulo/canalhandia/SanityTest.java new file mode 100644 index 0000000..f9df1e8 --- /dev/null +++ b/src/test/java/dev/marcospaulo/canalhandia/SanityTest.java @@ -0,0 +1,18 @@ +package dev.marcospaulo.canalhandia; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +/** + * Guards the test harness itself. The rest of the suite is written test-first, so + * a silently broken harness (surefire not discovering JUnit 5, wrong JDK) would + * read as "all tests pass" instead of "no tests ran". This one is here to fail loudly. + */ +class SanityTest { + + @Test + void harnessRuns() { + assertEquals(2, 1 + 1); + } +}