Add: Building0Test
This commit is contained in:
@@ -12,10 +12,14 @@ class Building0Test {
|
||||
@Test
|
||||
@DisplayName("After")
|
||||
void applyEffect() {
|
||||
Building0 b0 = new Building0(1, 0);
|
||||
int Era = 1;
|
||||
// Corretta creazione / esecuzione building card
|
||||
Building0 b0 = new Building0(1, 1);
|
||||
Player p = new Player("test");
|
||||
b0.buy(p);
|
||||
p.buildingCards.add(b0);
|
||||
b0.applyEffect(p);
|
||||
|
||||
assertEquals(0, p.getFoodValue());
|
||||
Artist a = new Artist(Era);
|
||||
Builder b = new Builder(Era, 0, 0);
|
||||
@@ -38,8 +42,10 @@ class Building0Test {
|
||||
void applyEffect2() {
|
||||
int Era = 1;
|
||||
Player p = new Player("test");
|
||||
|
||||
assertEquals(0, p.getFoodValue());
|
||||
Artist a = new Artist(Era);
|
||||
//a.insert(p);
|
||||
Builder b = new Builder(Era, 0, 0);
|
||||
Gatherers g = new Gatherers(Era);
|
||||
Hunter h = new Hunter(Era, true);
|
||||
@@ -51,7 +57,13 @@ class Building0Test {
|
||||
p.hunters.add(h);
|
||||
p.inventors.add(i);
|
||||
p.shamans.add(s);
|
||||
Building0 b0 = new Building0(1, 0);
|
||||
assertEquals(0, p.getFoodValue());
|
||||
|
||||
// Corretta creazione / esecuzione building card
|
||||
Building0 b0 = new Building0(1, 1);
|
||||
b0.buy(p);
|
||||
assertEquals(1, b0.numSet);
|
||||
p.buildingCards.add(b0);
|
||||
b0.applyEffect(p);
|
||||
assertEquals(0, p.getFoodValue());
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@ class SustenanceTest {
|
||||
@DisplayName("Exception Test Null List")
|
||||
void test_null() {
|
||||
ArrayList<Player> p = null;
|
||||
Sustenance s = new Sustenance(0,0);
|
||||
Sustenance s = new Sustenance(1,0);
|
||||
assertThrows(NullPointerException.class, () -> {
|
||||
s.activateEvent(p);
|
||||
});
|
||||
@@ -29,7 +29,7 @@ class SustenanceTest {
|
||||
Player p1 = new Player("p1");
|
||||
Player p2 = new Player("p2");
|
||||
ArrayList<Player> players = new ArrayList<>(Arrays.asList(p1,p2));
|
||||
Sustenance s = new Sustenance(0,1);
|
||||
Sustenance s = new Sustenance(1,1);
|
||||
s.activateEvent(players);
|
||||
assertEquals(0, p1.getFoodValue());
|
||||
assertEquals(0, p2.getFoodValue());
|
||||
|
||||
Reference in New Issue
Block a user