/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import business.Arvore;
import business.CenarioVolume;
import business.Projeto;
import dao.ProjetoDAO;
import java.util.List;
import javax.swing.JOptionPane;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author clayton
*/
public class CenarioTest {
public CenarioTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass
public static void tearDownClass() throws Exception {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
// @Ignore
@Test
public void testFindCenario() throws Exception {
long tempoInicialT = System.currentTimeMillis();
ProjetoDAO dao = new ProjetoDAO();
dao.connect();
Projeto p = dao.find(1);
CenarioVolume c = p.getCenarioById(1);
System.out.println(c);
assertNotNull(c);
dao.close();
long tempoFinalT = System.currentTimeMillis();
System.out.printf("Tempo: %.3f ms%n", (tempoFinalT - tempoInicialT) / 1000d);
}
}