Add: CavePaintingsTest
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
|||||||
|
package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events;
|
||||||
|
|
||||||
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Artist;
|
||||||
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
class CavePaintingsTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void activateEvent() {
|
||||||
|
Player p1 = new Player("Marco");
|
||||||
|
|
||||||
|
ArrayList<Player> players = new ArrayList<>(Arrays.asList(p1));
|
||||||
|
CavePaintings cp1 = new CavePaintings(1, 2, 1, 3, 2);
|
||||||
|
cp1.activateEvent(players);
|
||||||
|
|
||||||
|
assertEquals(-3, p1.getPrestigeValue());
|
||||||
|
assertEquals(0, p1.getFoodValue());
|
||||||
|
|
||||||
|
|
||||||
|
new Artist(1).insert(p1);
|
||||||
|
|
||||||
|
|
||||||
|
CavePaintings cp2 = new CavePaintings(1, 2, 1, 3, 2);
|
||||||
|
cp2.activateEvent(players);
|
||||||
|
|
||||||
|
assertEquals(-6, p1.getPrestigeValue());
|
||||||
|
assertEquals(0, p1.getFoodValue());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user