diff options
Diffstat (limited to 'sources/hv-collector-configuration/src/test')
-rw-r--r-- | sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/ArgHvVesConfigurationTest.kt | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/ArgHvVesConfigurationTest.kt b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/ArgHvVesConfigurationTest.kt index 6fe76958..dbe757c4 100644 --- a/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/ArgHvVesConfigurationTest.kt +++ b/sources/hv-collector-configuration/src/test/kotlin/org/onap/dcae/collectors/veshv/config/impl/ArgHvVesConfigurationTest.kt @@ -19,7 +19,6 @@ */ package org.onap.dcae.collectors.veshv.config.impl -import arrow.core.identity import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe @@ -28,6 +27,8 @@ import org.jetbrains.spek.api.dsl.it import org.jetbrains.spek.api.dsl.on import org.onap.dcae.collectors.veshv.commandline.WrongArgumentError import org.onap.dcae.collectors.veshv.tests.utils.absoluteResourcePath +import org.onap.dcae.collectors.veshv.tests.utils.parseExpectingFailure +import org.onap.dcae.collectors.veshv.tests.utils.parseExpectingSuccess import java.io.File /** @@ -69,15 +70,4 @@ object ArgVesHvConfigurationTest : Spek({ } } } -}) - -fun ArgHvVesConfiguration.parseExpectingSuccess(vararg cmdLine: String): File = - parseToFile(cmdLine).fold( - { throw AssertionError("Parsing result should be present") }, - ::identity - ) - -fun ArgHvVesConfiguration.parseExpectingFailure(vararg cmdLine: String): WrongArgumentError = - parseToFile(cmdLine).fold( - ::identity - ) { throw AssertionError("parsing should have failed") } +})
\ No newline at end of file |