Skip to content
Snippets Groups Projects
Commit 68bbf2be authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

fix test

parent 7b0cdcb4
No related branches found
No related tags found
4 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!138Load execution ID from file,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
This commit is part of merge request !138. Comments created here will be created in the context of that merge request.
...@@ -6,6 +6,7 @@ import org.hamcrest.CoreMatchers.containsString ...@@ -6,6 +6,7 @@ import org.hamcrest.CoreMatchers.containsString
import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.MatcherAssert.assertThat
import org.junit.Rule import org.junit.Rule
import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test import org.junit.jupiter.api.Test
import org.junit.rules.TemporaryFolder import org.junit.rules.TemporaryFolder
import org.junitpioneer.jupiter.ClearEnvironmentVariable import org.junitpioneer.jupiter.ClearEnvironmentVariable
...@@ -91,15 +92,18 @@ internal class IOHandlerTest { ...@@ -91,15 +92,18 @@ internal class IOHandlerTest {
@Test() @Test()
@SetEnvironmentVariable.SetEnvironmentVariables( @SetEnvironmentVariable.SetEnvironmentVariables(
SetEnvironmentVariable(key = "RESULTS_FOLDER", value = FOLDER_URL), SetEnvironmentVariable(key = "RESULTS_FOLDER", value = "$FOLDER_URL-0"),
SetEnvironmentVariable(key = "CREATE_RESULTS_FOLDER", value = "false") SetEnvironmentVariable(key = "CREATE_RESULTS_FOLDER", value = "false")
) )
fun testGetResultFolderURL_FolderNotExist() { fun testGetResultFolderURL_FolderNotExist() {
try { var exceptionWasThrown = false
IOHandler().getResultFolderURL() try {
} catch (e: Exception){ IOHandler().getResultFolderURL()
assertThat(e.toString(), containsString("Folder not found")); } catch (e: Exception){
} exceptionWasThrown = true
assertThat(e.toString(), containsString("Result folder not found"));
}
assertTrue(exceptionWasThrown)
} }
@Test() @Test()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment