Search in sources :

Example 21 with Cpu

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

Aggregations

Cpu (eu.ggnet.dwoss.spec.ee.entity.piece.Cpu)21 Gpu (eu.ggnet.dwoss.spec.ee.entity.piece.Gpu)11 Test (org.junit.Test)11 ProductModel (eu.ggnet.dwoss.spec.ee.entity.ProductModel)9 ProductFamily (eu.ggnet.dwoss.spec.ee.entity.ProductFamily)8 ProductSeries (eu.ggnet.dwoss.spec.ee.entity.ProductSeries)8 Notebook (eu.ggnet.dwoss.spec.ee.entity.Notebook)7 ProductSpec (eu.ggnet.dwoss.spec.ee.entity.ProductSpec)7 Display (eu.ggnet.dwoss.spec.ee.entity.piece.Display)7 CpuEao (eu.ggnet.dwoss.spec.ee.eao.CpuEao)6 Desktop (eu.ggnet.dwoss.spec.ee.entity.Desktop)5 ProductSpecEao (eu.ggnet.dwoss.spec.ee.eao.ProductSpecEao)3 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 DesktopBundle (eu.ggnet.dwoss.spec.ee.entity.DesktopBundle)2 DisplayAble (eu.ggnet.dwoss.spec.ee.entity.DisplayAble)2 Product (eu.ggnet.dwoss.uniqueunit.ee.entity.Product)2 EntityManager (javax.persistence.EntityManager)2 ProductProcessorStub (eu.ggnet.dwoss.receipt.stub.ProductProcessorStub)1