aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-main/src/test/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'hv-collector-main/src/test/kotlin')
-rw-r--r--hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt b/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
index 923f9d58..4c2425bc 100644
--- a/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
+++ b/hv-collector-main/src/test/kotlin/org/onap/dcae/collectors/veshv/main/ArgBasedServerConfigurationTest.kt
@@ -19,6 +19,8 @@
*/
package org.onap.dcae.collectors.veshv.main
+import arrow.core.Failure
+import arrow.core.Success
import org.assertj.core.api.Assertions.assertThat
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
@@ -44,7 +46,13 @@ object ArgBasedServerConfigurationTest : Spek({
cut = ArgBasedServerConfiguration()
}
- fun parse(vararg cmdLine: String) = cut.parse(cmdLine)
+ fun parse(vararg cmdLine: String): ServerConfiguration {
+ val result = cut.parse(cmdLine)
+ return when (result) {
+ is Success -> result.value
+ is Failure -> throw AssertionError("Parsing result should be present")
+ }
+ }
describe("parsing arguments") {
given("all parameters are present in the long form") {