File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff 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 ",
Original file line number Diff line number Diff line change @@ -11,18 +11,17 @@ package entity.user
1111import io.kotest.assertions.throwables.shouldThrow
1212import io.kotest.core.spec.style.StringSpec
1313import io.kotest.matchers.shouldBe
14- import java.lang.IllegalArgumentException
1514
1615class 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 }
You can’t perform that action at this time.
0 commit comments