Skip to content

Commit

Permalink
Add assertion messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tepi committed Jul 31, 2024
1 parent 3ed47c2 commit 7d41e74
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,13 @@ public void assertNavigationToSelfProducesNavigationEvents() {

private void assertMessages(int expectedSize) {
List<String> messages = getMessages();
Assert.assertEquals(expectedSize, messages.size());
Assert.assertEquals(NavigationEventsView.BEFORE_ENTER,
Assert.assertEquals("Unexpected amount of navigation events",
expectedSize, messages.size());
Assert.assertEquals("Second to last event should be BeforeEnter",
NavigationEventsView.BEFORE_ENTER,
messages.get(expectedSize - 2));
Assert.assertEquals(NavigationEventsView.AFTER_NAVIGATION,
Assert.assertEquals("Last event should be AfterNavigation",
NavigationEventsView.AFTER_NAVIGATION,
messages.get(expectedSize - 1));

}
Expand Down

0 comments on commit 7d41e74

Please sign in to comment.