From 402a8f55342c4565431c2a2e7287a70592f3fe33 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Thu, 6 Oct 2022 12:51:27 +0200 Subject: style: Eliminate use of wildcard imports This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide. --- .../org/opendc/simulator/flow/FlowConsumerContextTest.kt | 7 +++++-- .../kotlin/org/opendc/simulator/flow/FlowForwarderTest.kt | 14 +++++++++++--- .../test/kotlin/org/opendc/simulator/flow/FlowSinkTest.kt | 8 ++++++-- .../simulator/flow/mux/ForwardingFlowMultiplexerTest.kt | 6 +++++- .../opendc/simulator/flow/mux/MaxMinFlowMultiplexerTest.kt | 3 ++- 5 files changed, 29 insertions(+), 9 deletions(-) (limited to 'opendc-simulator/opendc-simulator-flow/src/test') diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowConsumerContextTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowConsumerContextTest.kt index d782d036..f89133dd 100644 --- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowConsumerContextTest.kt +++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowConsumerContextTest.kt @@ -22,8 +22,11 @@ package org.opendc.simulator.flow -import io.mockk.* -import org.junit.jupiter.api.* +import io.mockk.spyk +import io.mockk.verify +import net.bytebuddy.matcher.ElementMatchers.any +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows import org.opendc.simulator.flow.internal.FlowConsumerContextImpl import org.opendc.simulator.flow.internal.FlowEngineImpl import org.opendc.simulator.kotlin.runSimulation diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowForwarderTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowForwarderTest.kt index 2025dd52..f75e5037 100644 --- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowForwarderTest.kt +++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowForwarderTest.kt @@ -22,9 +22,17 @@ package org.opendc.simulator.flow -import io.mockk.* -import kotlinx.coroutines.* -import org.junit.jupiter.api.Assertions.* +import io.mockk.spyk +import io.mockk.verify +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlinx.coroutines.yield +import net.bytebuddy.matcher.ElementMatchers.any +import org.junit.jupiter.api.Assertions.assertAll +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Assertions.assertFalse +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowSinkTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowSinkTest.kt index 22a84edb..746d752d 100644 --- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowSinkTest.kt +++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/FlowSinkTest.kt @@ -24,9 +24,13 @@ package org.opendc.simulator.flow import io.mockk.spyk import io.mockk.verify -import kotlinx.coroutines.* -import org.junit.jupiter.api.* +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlinx.coroutines.yield import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.assertThrows import org.opendc.simulator.flow.internal.FlowEngineImpl import org.opendc.simulator.flow.source.FixedFlowSource import org.opendc.simulator.flow.source.FlowSourceRateAdapter diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/ForwardingFlowMultiplexerTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/ForwardingFlowMultiplexerTest.kt index cfd2bdf0..1a71580b 100644 --- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/ForwardingFlowMultiplexerTest.kt +++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/ForwardingFlowMultiplexerTest.kt @@ -27,7 +27,11 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertAll import org.junit.jupiter.api.assertThrows -import org.opendc.simulator.flow.* +import org.opendc.simulator.flow.FlowConnection +import org.opendc.simulator.flow.FlowForwarder +import org.opendc.simulator.flow.FlowSink +import org.opendc.simulator.flow.FlowSource +import org.opendc.simulator.flow.consume import org.opendc.simulator.flow.internal.FlowEngineImpl import org.opendc.simulator.flow.source.FixedFlowSource import org.opendc.simulator.flow.source.FlowSourceRateAdapter diff --git a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/MaxMinFlowMultiplexerTest.kt b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/MaxMinFlowMultiplexerTest.kt index 4e242292..34198f17 100644 --- a/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/MaxMinFlowMultiplexerTest.kt +++ b/opendc-simulator/opendc-simulator-flow/src/test/kotlin/org/opendc/simulator/flow/mux/MaxMinFlowMultiplexerTest.kt @@ -25,8 +25,9 @@ package org.opendc.simulator.flow.mux import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.launch import kotlinx.coroutines.yield -import org.junit.jupiter.api.* +import org.junit.jupiter.api.Assertions.assertAll import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test import org.opendc.simulator.flow.FlowSink import org.opendc.simulator.flow.consume import org.opendc.simulator.flow.internal.FlowEngineImpl -- cgit v1.2.3