From e316790f7132430c6d4e7621734999244fb2d34d Mon Sep 17 00:00:00 2001 From: Helfull Date: Sat, 28 Oct 2023 19:22:37 +0200 Subject: feat(Testing): add NEU as a test dependency (#599) add NEU as a test dependency #599 --- .../hannibal2/skyhanni/test/NEUDependencyTest.kt | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/java/at/hannibal2/skyhanni/test/NEUDependencyTest.kt (limited to 'src/test/java') diff --git a/src/test/java/at/hannibal2/skyhanni/test/NEUDependencyTest.kt b/src/test/java/at/hannibal2/skyhanni/test/NEUDependencyTest.kt new file mode 100644 index 000000000..8ba7d1e82 --- /dev/null +++ b/src/test/java/at/hannibal2/skyhanni/test/NEUDependencyTest.kt @@ -0,0 +1,27 @@ +package at.hannibal2.skyhanni.test + +import at.hannibal2.skyhanni.test.NEUDependent.test +import io.github.moulberry.notenoughupdates.util.SkyBlockTime +import io.mockk.every +import io.mockk.mockkObject +import org.junit.jupiter.api.Test + +object NEUDependent { + fun mockMe(): Boolean { + return false + } + + fun SkyBlockTime.test(): Boolean { + return true + } +} + +class NEUDependencyTest { + @Test + fun `test that we can have extensions of NEU on object classes`() { + mockkObject(NEUDependent) + every { NEUDependent.mockMe() } returns true + assert(NEUDependent.mockMe()) + assert(SkyBlockTime(0).test()) + } +} \ No newline at end of file -- cgit