package ingsw.proj.cluedo.junittests;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import ingsw.proj.cluedo.componenti.ArmiEnum;
import ingsw.proj.cluedo.componenti.Carta;
import ingsw.proj.cluedo.componenti.CartaArma;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class CartaArmaTest {
private CartaArma carta;
private ArmiEnum nome;
@Before
public void setUp() throws Exception {
nome = ArmiEnum.ASCIA;
carta = new CartaArma(nome);
}
@After
public void tearDown() throws Exception {
nome = null;
carta = null;
System.gc();
}
@Test
public void testCartaArma() {
assertTrue(carta instanceof CartaArma);
assertTrue(carta instanceof Carta);
assertNotNull(carta);
}
@Test(expected = NullPointerException.class)
public void testCartaArmaNull() {
new CartaArma(null);
}
}