Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Schinc committed May 17, 2024
1 parent 2f2d396 commit 3512161
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ChickenAttackerInitialMessageBoardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void testAnimalsIncludeTiger() {
TextMaker textMaker = new TextMakerTestImplementation();
MessageBoard messageBoard = new MessageBoard(textMaker, List.of());
Area<Zone.Meadow> meadowArea = new Area<>(Set.of(new Zone.Meadow(0, List.of(new Animal(10, Animal.Kind.TIGER), new Animal(10, Animal.Kind.AUROCHS)), null)), List.of(), 10);
assertTrue(messageBoard.withScoredHuntingTrap(PlayerColor.RED, meadowArea).messages().getFirst().text().contains("TIGER"));
assertTrue(messageBoard.withScoredHuntingTrap(PlayerColor.RED, meadowArea, Set.of()).messages().getFirst().text().contains("TIGER"));
}

}
4 changes: 2 additions & 2 deletions ChickenAttackerMessageBoardTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void messageBoardWithScoredHuntingTrapWorksWithUnworthyAnimals() {
var m3 = new Meadow(30, List.of(), SpecialPower.HUNTING_TRAP);
var meadowArea = new Area<>(Set.of(m1, m2, m3), List.of(RED), 0);
var mb = new MessageBoard(new BasicTextMaker(), List.of());
mb = mb.withScoredHuntingTrap(BLUE, meadowArea);
mb = mb.withScoredHuntingTrap(BLUE, meadowArea, Set.of());
assertEquals(List.of(), mb.messages());
}

Expand All @@ -169,7 +169,7 @@ void messageBoardWithScoredHuntingTrapWorksWithWorthyAnimals() {
var m3 = new Meadow(30, List.of(), SpecialPower.HUNTING_TRAP);
var meadowArea = new Area<>(Set.of(m1, m2, m3), List.of(RED, GREEN), 0);
var mb = new MessageBoard(new BasicTextMaker(), List.of());
mb = mb.withScoredHuntingTrap(BLUE, meadowArea);
mb = mb.withScoredHuntingTrap(BLUE, meadowArea, Set.of());
var expectedMessage = new MessageBoard.Message("BLUE|5|1×MAMMOTH/1×AUROCHS/0×DEER/0×TIGER", 5, Set.of(BLUE), Set.of(1, 2, 3));
assertEquals(List.of(expectedMessage), mb.messages());
}
Expand Down

0 comments on commit 3512161

Please sign in to comment.