import at.reisinger.obj.Card;
import at.reisinger.enums.CardType;
import at.reisinger.enums.ElementTyp;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

public class CardTest {

    @Test
    public void test_getName() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        assertEquals(card.getName(), "Name");
    }
    @Test
    public void test_getDamage() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        assertEquals(card.getDamage(), 10);
    }
    @Test
    public void test_getElementType() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        ElementTyp elementTyp = card.getElementTyp();
        assertSame(elementTyp, ElementTyp.WATER);
    }
    @Test
    public void test_getCardType() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        CardType cardType = card.getCardType();
        assertSame(cardType, CardType.SPELL);
    }
    @Test
    public void test_setName() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        card.setName("NeuerName");
        assertEquals(card.getName(), "NeuerName");
    }
    @Test
    public void test_setDamage() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        card.setDamage(100);
        assertEquals(card.getDamage(), 100);
    }
    @Test
    public void test_setElementTyp() {
        Card card = new Card("Name", 10, ElementTyp.WATER, CardType.SPELL);
        card.setElementType(ElementTyp.FIRE);
        assertSame(card.getElementTyp(), ElementTyp.FIRE);
    }
}
