Skip to content

Commit 0dc9ca4

Browse files
committed
fixed assertions in tests
1 parent 87d1f89 commit 0dc9ca4

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

  • core-tests/e2e-tests/spring/spring-rest-openapi-v3/src/test/kotlin/org/evomaster/e2etests/spring/openapi/v3/overlay

core-tests/e2e-tests/spring/spring-rest-openapi-v3/src/test/kotlin/org/evomaster/e2etests/spring/openapi/v3/overlay/OverlayEMTest.kt

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.evomaster.e2etests.spring.openapi.v3.overlay
22

33
import com.foo.rest.examples.spring.openapi.v3.overlay.OverlayController
44
import com.foo.rest.examples.spring.openapi.v3.stringlength.StringLengthController
5+
import org.evomaster.ci.utils.JUnitExtra
56
import org.evomaster.core.config.ConfigProblemException
67
import org.evomaster.core.problem.rest.data.HttpVerb
78
import org.evomaster.e2etests.spring.openapi.v3.SpringTestBase
@@ -85,16 +86,20 @@ class OverlayEMTest : SpringTestBase(){
8586
@Test
8687
fun testRunEM_Overlay_Z_fail() {
8788

88-
runTestHandlingFlakyAndCompilation(
89+
runTestHandlingFlaky(
8990
"Overlay_Z_fail",
90-
100
91+
"org.foo.Overlay_Z_fail",
92+
100,
93+
false
9194
) { args: MutableList<String> ->
9295

9396
setOption(args, "overlay", "src/main/resources/overlay/z.json")
9497
//default behavior must be non-lenient
9598

9699
//z does not exist
97-
assertThrows<ConfigProblemException> { initAndRun(args) }
100+
JUnitExtra.assertThrowsInnermost(ConfigProblemException::class.java) {
101+
initAndRun(args)
102+
}
98103
}
99104
}
100105

@@ -122,16 +127,20 @@ class OverlayEMTest : SpringTestBase(){
122127
@Test
123128
fun testRunEM_Overlay_folder() {
124129

125-
runTestHandlingFlakyAndCompilation(
130+
runTestHandlingFlaky(
126131
"Overlay_folder",
127-
100
132+
"org.foo.Overlay_folder",
133+
100,
134+
false,
128135
) { args: MutableList<String> ->
129136

130137
setOption(args, "overlay", "src/main/resources/overlay")
131138
//by default, z.json will be picked, and so failed because non-lenient
132139

133140
//z does not exist
134-
assertThrows<ConfigProblemException> { initAndRun(args) }
141+
JUnitExtra.assertThrowsInnermost(ConfigProblemException::class.java) {
142+
initAndRun(args)
143+
}
135144
}
136145
}
137146

@@ -157,4 +166,4 @@ class OverlayEMTest : SpringTestBase(){
157166
}
158167

159168

160-
}
169+
}

0 commit comments

Comments
 (0)