Fixed: compilation errors

This commit is contained in:
2026-04-21 15:51:19 +02:00
parent 29db8aef26
commit 3a39676819
2 changed files with 11 additions and 9 deletions
@@ -11,24 +11,26 @@ class PlayableCardTest {
@Test @Test
void PlayableCardWrongEraException() { void PlayableCardWrongEraException() {
assertDoesNotThrow(() -> { assertDoesNotThrow(() -> {
new BuildingCard(1, 5, 1); new BuildingCard(2,1, 5, 1);
}); });
assertDoesNotThrow(() -> { assertDoesNotThrow(() -> {
new BuildingCard(2, 5, 1); new BuildingCard(2, 2, 5, 1);
}); });
assertDoesNotThrow(() -> { assertDoesNotThrow(() -> {
new BuildingCard(3, 5, 1); new BuildingCard(2, 3, 5, 1);
}); });
assertThrows(IllegalArgumentException.class, () -> { assertThrows(IllegalArgumentException.class, () -> {
new BuildingCard(0, 5, 1); new BuildingCard(2, 0, 5, 1);
}); });
assertThrows(IllegalArgumentException.class, () -> { assertThrows(IllegalArgumentException.class, () -> {
new BuildingCard(4, 5, 1); new BuildingCard(2, 4, 5, 1);
}); });
assertThrows(IllegalArgumentException.class, () -> { assertThrows(IllegalArgumentException.class, () -> {
new BuildingCard(-1, 5, 1); new BuildingCard(2, -1, 5, 1);
}); });
} }
} }
@@ -201,8 +201,8 @@ class PlayerTest {
p.addFood(7); p.addFood(7);
p.artists.add(new Artist(1)); p.artists.add(new Artist(1));
p.artists.add(new Artist(2)); p.artists.add(new Artist(2));
p.buildingCards.add(new BuildingCard(1,2, 5)); p.buildingCards.add(new BuildingCard(2, 1,2, 5));
p.buildingCards.add(new BuildingCard(2,3, 6)); p.buildingCards.add(new BuildingCard(2, 2,3, 6));
assertEquals("test_usr:"+ "\n\t" + assertEquals("test_usr:"+ "\n\t" +
"Food: 7" + "\n\t" + "Food: 7" + "\n\t" +
"Prestige: 15" + "\n\t" + "Prestige: 15" + "\n\t" +