use of eu.ggnet.dwoss.spec.ee.entity.piece.Cpu in project dwoss by gg-net.
the class CpuEaoIT method testFindAll.
@Test
public void testFindAll() throws Exception {
// Bad solution. Better clean up the Database or else.
utx.begin();
em.joinTransaction();
em.persist(new Cpu(Cpu.Series.CORE, "Quad Q9000", Cpu.Type.MOBILE, 2.26, 4));
em.persist(new Cpu(Cpu.Series.CORE_I3, "Quad Q9100", Cpu.Type.MOBILE, 2.0, 4));
utx.commit();
utx.begin();
em.joinTransaction();
CpuEao cpuEao = new CpuEao(em);
List<Cpu> cpus = cpuEao.findAll();
assertNotNull(cpus);
assertEquals(2, cpus.size());
utx.commit();
}
Aggregations