Add: Added "toString" Method And Relevant Test In Building11.java And Building11Test.java.
This commit is contained in:
+22
-1
@@ -3,7 +3,6 @@ package it.polimi.ingsw.gc14.Model.Cards.Building.Effects;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.Building.EffectType;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Artist;
|
||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters.Hunter;
|
||||
import it.polimi.ingsw.gc14.Model.Player;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -109,4 +108,26 @@ class Building11Test {
|
||||
b4.applyEffect(p5);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("toString")
|
||||
void testToString(){
|
||||
Building11 b11 = new Building11(1,2,3, CharacterType.INVENTOR, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: INVENTOR", b11.toString());
|
||||
|
||||
b11 = new Building11(1,2,3, CharacterType.BUILDER, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: BUILDER", b11.toString());
|
||||
|
||||
b11 = new Building11(1,2,3, CharacterType.GATHERER, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: GATHERER", b11.toString());
|
||||
|
||||
b11 = new Building11(1,2,3, CharacterType.ARTIST, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: ARTIST", b11.toString());
|
||||
|
||||
b11 = new Building11(1,2,3, CharacterType.SHAMAN, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: SHAMAN", b11.toString());
|
||||
|
||||
b11 = new Building11(1,2,3, CharacterType.HUNTER, 1);
|
||||
assertEquals("Era:1 Price:2 Prestige:3 Icon: HUNTER", b11.toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user