ShamanicRitualTest: test building 6 edge case added

SustenanceTest: Testing food debt with 2 characters
This commit is contained in:
2026-04-07 19:44:47 +02:00
parent 40933e2e94
commit 513f9e2d87
2 changed files with 30 additions and 1 deletions
@@ -147,6 +147,7 @@ class ShamanicRitualTest {
Player p1 = new Player("Marco");
Player p2 = new Player("Luca");
ArrayList<Player> players = new ArrayList<>(Arrays.asList(p1, p2));
new Shaman(1, 3).insert(p1);
@@ -163,6 +164,32 @@ class ShamanicRitualTest {
assertEquals(-5, p2.getPrestigeValue());
}
@Test
@DisplayName("p1 has building 6 but p2 has same icons")
void applyEvent7() {
Player p1 = new Player("Marco");
Player p2 = new Player("Luca");
Player p3 = new Player("Giacomo");
ArrayList<Player> players = new ArrayList<>(Arrays.asList(p1, p2, p3));
new Shaman(1, 3).insert(p1);
new Shaman(1, 3).insert(p2);
new Shaman(1, 1).insert(p3);
BuildingCard b = new BuildingCard(6, 1, 5, 1);
p1.addFood(5);
b.buy(p1);
ShamanicRitual ritual = new ShamanicRitual(1, 10, 5);
ritual.activateEvent(players);
assertEquals(10, p1.getPrestigeValue());
assertEquals(10, p2.getPrestigeValue());
assertEquals(-5, p3.getPrestigeValue());
}
@Test
@DisplayName("Clone testing")
void cloneTest() {
@@ -55,6 +55,8 @@ class SustenanceTest {
p2.addFood(1);
new Artist(1).insert(p2);
new Hunter(1, true).insert(p2);
new Hunter(1, true).insert(p2);
Sustenance s = new Sustenance(1,2);
@@ -62,7 +64,7 @@ class SustenanceTest {
assertEquals(1, p1.getFoodValue());
assertEquals(0, p2.getFoodValue());
assertEquals(0, p1.getPrestigeValue());
assertEquals(-2, p2.getPrestigeValue());
assertEquals(-4, p2.getPrestigeValue());
}
@Test