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(2,1, 5, 1);
        });
        assertDoesNotThrow(() -> {
            new BuildingCard(2, 2, 5, 1);
        });
        assertDoesNotThrow(() -> {
            new BuildingCard(2, 3, 5, 1);
        });

        assertThrows(IllegalArgumentException.class, () -> {
            new BuildingCard(2, 0, 5, 1);
        });
        assertThrows(IllegalArgumentException.class, () -> {
            new BuildingCard(2, 4, 5, 1);
        });
        assertThrows(IllegalArgumentException.class, () -> {
            new BuildingCard(2, -1, 5, 1);
        });

    }
}


