Skip to content

Commit

Permalink
minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
timvahlbrock committed Jul 14, 2024
1 parent 8271134 commit de83916
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,16 @@ class TestTemplateTest {
@TestTemplate
fun testPactForReservationBooking(message: V4Interaction.AsynchronousMessage) {
assertThat(message, `is`(notNullValue()))
if (message.description == "a purchase started message to book a reservation") {
reservationRan = true
} else if(message.description == "a cancellation message to cancel a reservation") {
cancellationRan = true
} else {
throw IllegalArgumentException("Unknown message description")
when (message.description) {
"a purchase started message to book a reservation" -> {
reservationRan = true
}
"a cancellation message to cancel a reservation" -> {
cancellationRan = true
}
else -> {
throw IllegalArgumentException("Unknown message description")
}
}
}
}

0 comments on commit de83916

Please sign in to comment.