Skip to content
Snippets Groups Projects
Commit 624ccd8c authored by Benedikt Wetzel's avatar Benedikt Wetzel Committed by Sören Henning
Browse files

fix test

parent ad8c01e3
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
......@@ -6,6 +6,7 @@ import org.hamcrest.CoreMatchers.containsString
import org.hamcrest.MatcherAssert.assertThat
import org.junit.Rule
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.Test
import org.junit.rules.TemporaryFolder
import org.junitpioneer.jupiter.ClearEnvironmentVariable
......@@ -91,15 +92,18 @@ internal class IOHandlerTest {
@Test()
@SetEnvironmentVariable.SetEnvironmentVariables(
SetEnvironmentVariable(key = "RESULTS_FOLDER", value = FOLDER_URL),
SetEnvironmentVariable(key = "RESULTS_FOLDER", value = "$FOLDER_URL-0"),
SetEnvironmentVariable(key = "CREATE_RESULTS_FOLDER", value = "false")
)
fun testGetResultFolderURL_FolderNotExist() {
try {
IOHandler().getResultFolderURL()
} catch (e: Exception){
assertThat(e.toString(), containsString("Folder not found"));
}
var exceptionWasThrown = false
try {
IOHandler().getResultFolderURL()
} catch (e: Exception){
exceptionWasThrown = true
assertThat(e.toString(), containsString("Result folder not found"));
}
assertTrue(exceptionWasThrown)
}
@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