Skip to content

Commit b0d0ddf

Browse files
committed
fix(test): rename class and modify test case to assert null return for invalid regex pattern.
1 parent 02ab0c8 commit b0d0ddf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

exts/devins-lang/src/test/kotlin/cc/unitmesh/devti/language/compiler/exec/FileFuncInsCommandTest.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cc.unitmesh.devti.language.compiler.exec;
33
import org.junit.Assert.*
44
import org.junit.Test
55

6-
class JavaAutoTestServiceTest {
6+
class FileFuncInsCommandTest {
77

88
@Test
99
fun shouldParseRegexCorrectly() {
@@ -15,10 +15,11 @@ class JavaAutoTestServiceTest {
1515
assertEquals(expectedResult, result)
1616
}
1717

18-
@Test(expected = IllegalArgumentException::class)
19-
fun shouldThrowExceptionForInvalidPattern() {
18+
@Test
19+
fun shouldReturnNullWhenError() {
2020
val prop = "click"
2121

22-
FileFuncInsCommand.parseRegex(prop)
22+
val result = FileFuncInsCommand.parseRegex(prop)
23+
assertNull(result)
2324
}
2425
}

0 commit comments

Comments
 (0)