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