diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-11-13 13:44:56 +0000 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-11-13 17:42:02 +0000 |
| commit | 33d91ef30ad7bcb73365934fe536461210d1082a (patch) | |
| tree | 69cc966d202a922effd526cbb2d1bb6a2d5049b3 | |
| parent | 5eb2a9dcd398f6d2473b7b9e45b51e1182fe3b5b (diff) | |
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.
| -rw-r--r-- | opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/TestInlet.kt | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |
