/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package empresa.dao; import com.tecgraf.dao.FacadeJPA; import com.tecgraf.dao.GenericDAOJPAException; import java.util.logging.Level; import java.util.logging.Logger; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; /** * * @author s092 */ public class DepartamentoDAOTest { public DepartamentoDAOTest() { } @BeforeClass public static void setUpClass() throws Exception { } @AfterClass public static void tearDownClass() throws Exception { } @Before public void setUp() { } @After public void tearDown() { } /** * Test of getInstance method, of class DepartamentoDAO. */ @Test public void testGetInstance() { System.out.println("getInstance"); String persistUnitStr = "EmpresaJPAPU"; FacadeJPA facJPA=null; try { facJPA = FacadeJPA.getInstance(persistUnitStr); } catch( GenericDAOJPAException ex ) { Logger.getLogger(DepartamentoDAOTest.class.getName()).log(Level.SEVERE, null, ex); } DepartamentoDAO expResult = null; DepartamentoDAO result = DepartamentoDAO.getInstance(facJPA); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } }