summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-power/src
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2022-10-06 15:34:19 +0200
committerGitHub <noreply@github.com>2022-10-06 15:34:19 +0200
commit7ba3b953300c46b4e3afcde17cd3dd14b1af8406 (patch)
tree950ba678869ec868c26ab3b95b57e4cabadb23c7 /opendc-simulator/opendc-simulator-power/src
parentc2047d09b27b0c05f5c203509dde524e17d3b729 (diff)
parent47357afd16f928260db34d4dd3e686fb9ee7c5ff (diff)
merge: Update build and runtime dependencies (#107)
This pull request updates the build and runtime dependencies used by OpenDC to their latest version compatible with the project. ## Implementation Notes :hammer_and_pick: * Update simulator dependency versions * Remove unused distribution conventions * Update next version to 3.0 * Eliminate use of wildcard imports * Switch to Spotless for formatting
Diffstat (limited to 'opendc-simulator/opendc-simulator-power/src')
-rw-r--r--opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt7
-rw-r--r--opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt7
-rw-r--r--opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt5
3 files changed, 14 insertions, 5 deletions
diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt
index 9f88fecc..c4076310 100644
--- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt
+++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt
@@ -22,7 +22,10 @@
package org.opendc.simulator.power
-import org.opendc.simulator.flow.*
+import org.opendc.simulator.flow.FlowConsumer
+import org.opendc.simulator.flow.FlowEngine
+import org.opendc.simulator.flow.FlowMapper
+import org.opendc.simulator.flow.FlowSource
import org.opendc.simulator.flow.mux.FlowMultiplexer
import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer
@@ -36,7 +39,7 @@ import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer
public class SimPdu(
engine: FlowEngine,
private val idlePower: Double = 0.0,
- private val lossCoefficient: Double = 0.0,
+ private val lossCoefficient: Double = 0.0
) : SimPowerInlet() {
/**
* The [FlowMultiplexer] that distributes the electricity over the PDU outlets.
diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt
index 46d659f8..0431d3cf 100644
--- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt
+++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimUps.kt
@@ -22,7 +22,10 @@
package org.opendc.simulator.power
-import org.opendc.simulator.flow.*
+import org.opendc.simulator.flow.FlowEngine
+import org.opendc.simulator.flow.FlowForwarder
+import org.opendc.simulator.flow.FlowMapper
+import org.opendc.simulator.flow.FlowSource
import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer
/**
@@ -37,7 +40,7 @@ import org.opendc.simulator.flow.mux.MaxMinFlowMultiplexer
public class SimUps(
private val engine: FlowEngine,
private val idlePower: Double = 0.0,
- private val lossCoefficient: Double = 0.0,
+ private val lossCoefficient: Double = 0.0
) : SimPowerOutlet() {
/**
* The resource aggregator used to combine the input sources.
diff --git a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt
index b83b6ba7..963ba710 100644
--- a/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt
+++ b/opendc-simulator/opendc-simulator-power/src/test/kotlin/org/opendc/simulator/power/SimPowerSourceTest.kt
@@ -26,7 +26,10 @@ import io.mockk.every
import io.mockk.mockk
import io.mockk.spyk
import io.mockk.verify
-import org.junit.jupiter.api.Assertions.*
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertFalse
+import org.junit.jupiter.api.Assertions.assertNull
+import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertDoesNotThrow
import org.junit.jupiter.api.assertThrows