Skip to content

Commit ac52a51

Browse files
chore: change exception type in test
1 parent cbcd490 commit ac52a51

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/test/kotlin/entity/healthprofessional/HealthProfessionalTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HealthProfessionalTest : StringSpec({
2929
)
3030

3131
"An Healh Professional ID should not be empty" {
32-
shouldThrow<IllegalArgumentException> {
32+
shouldThrow<IllegalStateException> {
3333
HealthProfessional(
3434
"",
3535
"Jack",

src/test/kotlin/entity/user/UserTest.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@ package entity.user
1111
import io.kotest.assertions.throwables.shouldThrow
1212
import io.kotest.core.spec.style.StringSpec
1313
import io.kotest.matchers.shouldBe
14-
import java.lang.IllegalArgumentException
1514

1615
class UserTest : StringSpec({
1716

1817
"An User should not be empty" {
19-
shouldThrow<IllegalArgumentException> {
18+
shouldThrow<IllegalStateException> {
2019
User("", "")
2120
}
2221
}
2322

2423
"A short password should throw exception" {
25-
shouldThrow<IllegalArgumentException> {
24+
shouldThrow<IllegalStateException> {
2625
User("userID", "short")
2726
}
2827
}

0 commit comments

Comments
 (0)