Add: Added "clone" Method Test In Building1Test.java.
This commit is contained in:
@@ -2,6 +2,7 @@ package it.polimi.ingsw.gc14.Model.Cards.Building.Effects;
|
|||||||
|
|
||||||
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
|
||||||
import it.polimi.ingsw.gc14.Model.Player;
|
import it.polimi.ingsw.gc14.Model.Player;
|
||||||
|
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
||||||
import org.junit.jupiter.api.DisplayName;
|
import org.junit.jupiter.api.DisplayName;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
@@ -48,4 +49,21 @@ class Building1Test {
|
|||||||
assertEquals(0, p.getPrestigeValue());
|
assertEquals(0, p.getPrestigeValue());
|
||||||
assertEquals(user, p.getUserName());
|
assertEquals(user, p.getUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@DisplayName("Clone")
|
||||||
|
void Clone(){
|
||||||
|
int Era = 1;
|
||||||
|
int Price = 2;
|
||||||
|
int Prestige = 3;
|
||||||
|
CharacterType ct = CharacterType.INVENTOR;
|
||||||
|
Building1 b0 = new Building1(Era,Price,Prestige, ct);
|
||||||
|
|
||||||
|
BuildingCard bClone = b0.clone();
|
||||||
|
|
||||||
|
assertEquals(Era,b0.getEra());
|
||||||
|
assertEquals(Price,b0.getPrice());
|
||||||
|
assertEquals(Prestige, bClone.getPrestigeValue());
|
||||||
|
assertEquals(ct, b0.getIcon());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user