Package ingsw.proj.cluedo.junittests

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

package ingsw.proj.cluedo.junittests;

import static org.junit.Assert.assertNotNull;
import ingsw.proj.cluedo.componenti.CartaStanza;
import ingsw.proj.cluedo.componenti.StanzeEnum;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class CartaStanzaTest {
 
  private CartaStanza carta;
  private StanzeEnum nome;

  @Before
  public void setUp() throws Exception {
    nome = StanzeEnum.BAGNO;
    carta = new CartaStanza(nome);
  }

  @After
  public void tearDown() throws Exception {
    carta = null;
    nome = null;
    System.gc();
  }

  @Test
  public void testCartaStanza() {
    assertNotNull(carta);   
  }
 
  @Test(expected = NullPointerException.class)
  public void testCartaStanzaNull() {
    new CartaStanza(null);
  }

}
TOP

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

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.