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

fix test

parent ffe1e9ad
No related branches found
No related tags found
No related merge requests found
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