diff --git a/doorman/src/test/kotlin/com/r3/corda/doorman/DoormanParametersTest.kt b/doorman/src/test/kotlin/com/r3/corda/doorman/DoormanParametersTest.kt index 2f53e80e02..8aa433ad8d 100644 --- a/doorman/src/test/kotlin/com/r3/corda/doorman/DoormanParametersTest.kt +++ b/doorman/src/test/kotlin/com/r3/corda/doorman/DoormanParametersTest.kt @@ -1,20 +1,24 @@ package com.r3.corda.doorman import org.junit.Test +import java.io.File import kotlin.test.assertEquals import kotlin.test.assertTrue class DoormanParametersTest { + + private val testDummyPath = ".${File.separator}testDummyPath.jks" + @Test fun `parse arg correctly`() { - val params = DoormanParameters(arrayOf("--keygen", "--keystorePath", "./testDummyPath.jks")) + val params = DoormanParameters(arrayOf("--keygen", "--keystorePath", testDummyPath)) assertEquals(DoormanParameters.Mode.CA_KEYGEN, params.mode) - assertEquals("./testDummyPath.jks", params.keystorePath.toString()) + assertEquals(testDummyPath, params.keystorePath.toString()) assertEquals(0, params.port) - val params2 = DoormanParameters(arrayOf("--keystorePath", "./testDummyPath.jks", "--port", "1000")) + val params2 = DoormanParameters(arrayOf("--keystorePath", testDummyPath, "--port", "1000")) assertEquals(DoormanParameters.Mode.DOORMAN, params2.mode) - assertEquals("./testDummyPath.jks", params2.keystorePath.toString()) + assertEquals(testDummyPath, params2.keystorePath.toString()) assertEquals(1000, params2.port) } }