From 46fab266f6c7855c535f51fb6656271c6bf9fde3 Mon Sep 17 00:00:00 2001 From: Schinc Date: Fri, 24 May 2024 13:16:33 +0000 Subject: [PATCH] Add tests --- ChickenAttackerInitialMessageBoardTest.java | 8 ------ ChickenAttackerMessageBoardTest.java | 30 --------------------- 2 files changed, 38 deletions(-) diff --git a/ChickenAttackerInitialMessageBoardTest.java b/ChickenAttackerInitialMessageBoardTest.java index 5636d86..c611a1a 100644 --- a/ChickenAttackerInitialMessageBoardTest.java +++ b/ChickenAttackerInitialMessageBoardTest.java @@ -41,12 +41,4 @@ void testScoredForestReturnsZero() { assertEquals(0, board.withClosedForestWithMenhir(PlayerColor.RED, forestArea).messages().getFirst().points()); } - @Test - void testAnimalsIncludeTiger() { - TextMaker textMaker = new TextMakerTestImplementation(); - MessageBoard messageBoard = new MessageBoard(textMaker, List.of()); - Area 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, Set.of()).messages().getFirst().text().contains("TIGER")); - } - } \ No newline at end of file diff --git a/ChickenAttackerMessageBoardTest.java b/ChickenAttackerMessageBoardTest.java index c9d7bd9..da2ab15 100644 --- a/ChickenAttackerMessageBoardTest.java +++ b/ChickenAttackerMessageBoardTest.java @@ -230,21 +230,6 @@ void messageBoardWithScoredMeadowWorksWithWorthyButCancelledAnimals() { assertEquals(List.of(), mb.messages()); } - @Test - void messageBoardWithScoredMeadowWorksWithWorthyAnimals() { - var a1 = new Animal(10_1, Animal.Kind.MAMMOTH); - var a2 = new Animal(20_1, Animal.Kind.AUROCHS); - var a3 = new Animal(20_2, Animal.Kind.TIGER); - var m1 = new Meadow(10, List.of(a1), null); - var m2 = new Meadow(20, List.of(a2, a3), null); - var m3 = new Meadow(30, List.of(), null); - var meadowArea = new Area<>(Set.of(m1, m2, m3), List.of(RED, BLUE), 3); - var mb = new MessageBoard(new BasicTextMaker(), List.of()); - mb = mb.withScoredMeadow(meadowArea, Set.of()); - var expectedMessage = new MessageBoard.Message("{RED,BLUE}|5|1×MAMMOTH/1×AUROCHS/0×DEER/1×TIGER", 5, Set.of(RED, BLUE), Set.of(1, 2, 3)); - assertEquals(List.of(expectedMessage), mb.messages()); - } - @Test void messageBoardWithScoredRiverSystemWorksWithUnoccupiedRiverSystem() { var l1 = new Lake(18, 1, null); @@ -339,21 +324,6 @@ void messageBoardWithScoredPitTrapWorksWithWorthyButCancelledAnimals() { assertEquals(List.of(), mb.messages()); } - @Test - void messageBoardWithScoredPitTrapWorksWithWorthyAnimals() { - var a1 = new Animal(10_1, Animal.Kind.MAMMOTH); - var a2 = new Animal(20_1, Animal.Kind.AUROCHS); - var a3 = new Animal(20_2, Animal.Kind.TIGER); - var m1 = new Meadow(10, List.of(a1), null); - var m2 = new Meadow(20, List.of(a2, a3), null); - var m3 = new Meadow(30, List.of(), null); - var meadowArea = new Area<>(Set.of(m1, m2, m3), List.of(RED, BLUE), 3); - var mb = new MessageBoard(new BasicTextMaker(), List.of()); - mb = mb.withScoredPitTrap(meadowArea, Set.of()); - var expectedMessage = new MessageBoard.Message("{RED,BLUE}|5|1×MAMMOTH/1×AUROCHS/0×DEER/1×TIGER", 5, Set.of(RED, BLUE), Set.of(1, 2, 3)); - assertEquals(List.of(expectedMessage), mb.messages()); - } - @Test void messageBoardWithScoredRaftWorksWithUnoccupiedRiverSystem() { var l1 = new Lake(18, 1, null);