Search in sources :

Example 6 with CpuEao

use of eu.ggnet.dwoss.spec.ee.eao.CpuEao 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();
}
Also used : Cpu(eu.ggnet.dwoss.spec.ee.entity.piece.Cpu) CpuEao(eu.ggnet.dwoss.spec.ee.eao.CpuEao) Test(org.junit.Test)

Aggregations

CpuEao (eu.ggnet.dwoss.spec.ee.eao.CpuEao)6 Cpu (eu.ggnet.dwoss.spec.ee.entity.piece.Cpu)6 GpuEao (eu.ggnet.dwoss.spec.ee.eao.GpuEao)2 DisplayEmo (eu.ggnet.dwoss.spec.ee.emo.DisplayEmo)2 ProductModelEmo (eu.ggnet.dwoss.spec.ee.emo.ProductModelEmo)2 Desktop (eu.ggnet.dwoss.spec.ee.entity.Desktop)2 DisplayAble (eu.ggnet.dwoss.spec.ee.entity.DisplayAble)2 Gpu (eu.ggnet.dwoss.spec.ee.entity.piece.Gpu)2 EntityManager (javax.persistence.EntityManager)2 Test (org.junit.Test)2 SpecGenerator (eu.ggnet.dwoss.spec.ee.assist.gen.SpecGenerator)1 ProductSpecEao (eu.ggnet.dwoss.spec.ee.eao.ProductSpecEao)1 DesktopBundle (eu.ggnet.dwoss.spec.ee.entity.DesktopBundle)1 ProductModel (eu.ggnet.dwoss.spec.ee.entity.ProductModel)1 ProductSpec (eu.ggnet.dwoss.spec.ee.entity.ProductSpec)1 ProductEao (eu.ggnet.dwoss.uniqueunit.ee.eao.ProductEao)1 Product (eu.ggnet.dwoss.uniqueunit.ee.entity.Product)1