From: David ‘Bombe’ Roden Date: Mon, 27 May 2019 05:11:50 +0000 (+0200) Subject: ♻️ Use new method to set field in tests X-Git-Tag: v79^2~9 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=302224657d3faf7659b3477ea8d0e7e249b7c7b6;p=Sone.git ♻️ Use new method to set field in tests --- diff --git a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt index ecb42f3..6d57b9f 100644 --- a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt @@ -5,9 +5,7 @@ import freenet.l10n.BaseL10n.LANGUAGE.ENGLISH import freenet.node.Node import freenet.node.NodeClientCore import freenet.pluginmanager.PluginRespirator -import net.pterodactylus.sone.test.TestUtil -import net.pterodactylus.sone.test.deepMock -import net.pterodactylus.sone.test.whenever +import net.pterodactylus.sone.test.* import org.junit.Test /** @@ -22,9 +20,9 @@ class SonePluginTest { private val uskManager = deepMock() init { - TestUtil.setFinalField(node, "clientCore", clientCore) + setField(node, "clientCore", clientCore) whenever(pluginRespirator.node).thenReturn(node) - TestUtil.setFinalField(clientCore, "uskManager", uskManager) + setField(clientCore, "uskManager", uskManager) } @Test