Skip to content

Commit 425cb95

Browse files
authored
Fix test for incrementTodaysCount method
Update test to check correct increment behavior for today's count.
1 parent 35f9340 commit 425cb95

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

exercises/concept/bird-watcher/src/test/java/BirdWatcherTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,13 @@ public void itTestGetCountForMoreDaysThanTheArraySize() {
8383
public void itIncrementDoesNotChangeCountForOtherDays() {
8484
int[] counts = new int[] {5, 1, 0, 4, 2, 3, 0};
8585
BirdWatcher birdWatcher = new BirdWatcher(counts);
86+
8687
int countPriorIncrement = birdWatcher.getCountForFirstDays(7);
8788
birdWatcher.incrementTodaysCount();
8889
int countAfterIncrement = birdWatcher.getCountForFirstDays(7);
89-
assertThat(countPriorIncrement).isEqualTo(countAfterIncrement - 1);
90+
91+
assertThat(countPriorIncrement).isEqualTo(15);
92+
assertThat(countAfterIncrement).isEqualTo(16);
9093
}
9194

9295
@Test

0 commit comments

Comments
 (0)