Package ingsw.proj.cluedo.junittests

Source Code of ingsw.proj.cluedo.junittests.CongetturaRidottaTest

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)
  }

}
TOP

Related Classes of ingsw.proj.cluedo.junittests.CongetturaRidottaTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.