♻️ Use new method to set field in tests
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 May 2019 05:11:50 +0000 (07:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 27 May 2019 05:11:50 +0000 (07:11 +0200)
src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt

index ecb42f3..6d57b9f 100644 (file)
@@ -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<USKManager>()
 
        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