package ingsw.proj.cluedo.junittests;
import static org.junit.Assert.assertNotNull;
import ingsw.proj.cluedo.componenti.ArmiEnum;
import ingsw.proj.cluedo.componenti.Congettura;
import ingsw.proj.cluedo.componenti.CongetturaRidotta;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class CongetturaTest {
String accusato;
ArmiEnum arma;
CongetturaRidotta cong;
Congettura cong2;
@Before
public void setUp() throws Exception {
accusato = "Luigi";
arma = ArmiEnum.FIONDA;
cong = new CongetturaRidotta(accusato, arma);
cong2 = new Congettura(cong, accusato);
}
@After
public void tearDown() throws Exception {
accusato = null;
arma = null;
cong = null;
cong2 = null;
System.gc();
}
@Test
public void testCongettura() {
assertNotNull(cong2);
}
@Test(expected = NullPointerException.class)
public void parametroNull() {
new Congettura(cong, null);
new Congettura(null, null);
new Congettura(cong, " ");
}
}