From a7d456be151264443864513d33eebb1e7e4950a6 Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Wed, 1 Mar 2017 14:44:35 +0000 Subject: [PATCH] CORPRIV-699: Use platform-specific separator. --- .../com/r3/corda/doorman/DoormanParametersTest.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) } }