Skip to content

Commit

Permalink
Fail test if exception doesn't occur
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Chaloner committed Sep 28, 2023
1 parent a05de1d commit 60fc975
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/seatsio/events/UpdateEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static java.time.Instant.now;
import static java.time.temporal.ChronoUnit.MINUTES;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static seatsio.events.TableBookingMode.BY_SEAT;
import static seatsio.events.TableBookingMode.BY_TABLE;

Expand Down Expand Up @@ -162,6 +163,7 @@ public void updateIsInThePast() {

try {
client.events.update("event1", new UpdateEventParams().withIsInThePast(true));
fail("Expected an exception");
} catch (SeatsioException e) {
assertThat(e.getMessage()).isEqualTo("Events in the past cannot be updated");
}
Expand Down

0 comments on commit 60fc975

Please sign in to comment.