From 33d91ef30ad7bcb73365934fe536461210d1082a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sun, 13 Nov 2022 13:44:56 +0000 Subject: test(sim/power): Remove use of Spy object from TestInlet This change removes the use of a Spy object from the TestInlet class. Since the Spy is not actually used in our tests, we remove it due to the high initialization cost. --- .../src/test/kotlin/org/opendc/simulator/power/TestInlet.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'opendc-simulator') diff --git a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/TestInlet.kt b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/TestInlet.kt index 7ba12ed9..d5f509e7 100644 --- a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/TestInlet.kt +++ b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/TestInlet.kt @@ -22,7 +22,6 @@ package org.opendc.simulator.power -import io.mockk.spyk import org.opendc.simulator.flow2.FlowGraph import org.opendc.simulator.flow2.FlowStage import org.opendc.simulator.flow2.FlowStageLogic @@ -32,8 +31,7 @@ import org.opendc.simulator.flow2.Outlet * A test inlet. */ class TestInlet(graph: FlowGraph) : SimPowerInlet(), FlowStageLogic { - val logic = spyk(this) - private val stage = graph.newStage(logic) + private val stage = graph.newStage(this) val flowOutlet = stage.getOutlet("out") init { -- cgit v1.2.3