34 lines
894 B
Java
34 lines
894 B
Java
package it.polimi.ingsw.gc14.Model;
|
|
|
|
import it.polimi.ingsw.gc14.Model.Cards.BuildingCard;
|
|
import it.polimi.ingsw.gc14.Model.Cards.TribeCard;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
class PlayableCardTest {
|
|
|
|
@Test
|
|
void PlayableCardWrongEraException() {
|
|
assertDoesNotThrow(() -> {
|
|
new BuildingCard(1, 5);
|
|
});
|
|
assertDoesNotThrow(() -> {
|
|
new BuildingCard(2, 5);
|
|
});
|
|
assertDoesNotThrow(() -> {
|
|
new BuildingCard(3, 5);
|
|
});
|
|
|
|
assertThrows(IllegalArgumentException.class, () -> {
|
|
new BuildingCard(0, 5);
|
|
});
|
|
assertThrows(IllegalArgumentException.class, () -> {
|
|
new BuildingCard(4, 5);
|
|
});
|
|
assertThrows(IllegalArgumentException.class, () -> {
|
|
new BuildingCard(-1, 5);
|
|
});
|
|
|
|
}
|
|
} |