/** @generated */ @Test public void deleteProjectSponsorTest() { ProjectSponsorEntity entity = data.get(0); projectSponsorPersistence.delete(entity.getId()); ProjectSponsorEntity deleted = em.find(ProjectSponsorEntity.class, entity.getId()); Assert.assertNull(deleted); }
/** @generated */ @Test public void getProjectSponsorTest() { ProjectSponsorEntity entity = data.get(0); ProjectSponsorEntity newEntity = projectSponsorPersistence.find(entity.getId()); Assert.assertNotNull(newEntity); Assert.assertEquals(entity.getName(), newEntity.getName()); Assert.assertEquals(entity.getCompany(), newEntity.getCompany()); Assert.assertEquals(entity.getPicture(), newEntity.getPicture()); }
/** @generated */ @Test public void getProjectSponsorsTest() { List<ProjectSponsorEntity> list = projectSponsorPersistence.findAll(); Assert.assertEquals(data.size(), list.size()); for (ProjectSponsorEntity ent : list) { boolean found = false; for (ProjectSponsorEntity entity : data) { if (ent.getId().equals(entity.getId())) { found = true; } } Assert.assertTrue(found); } }
/** @generated */ @Test public void createProjectSponsorTest() { PodamFactory factory = new PodamFactoryImpl(); ProjectSponsorEntity newEntity = factory.manufacturePojo(ProjectSponsorEntity.class); ProjectSponsorEntity result = projectSponsorPersistence.create(newEntity); Assert.assertNotNull(result); ProjectSponsorEntity entity = em.find(ProjectSponsorEntity.class, result.getId()); Assert.assertEquals(newEntity.getName(), entity.getName()); Assert.assertEquals(newEntity.getCompany(), entity.getCompany()); Assert.assertEquals(newEntity.getPicture(), entity.getPicture()); }
/** @generated */ @Test public void updateProjectSponsorTest() { ProjectSponsorEntity entity = data.get(0); PodamFactory factory = new PodamFactoryImpl(); ProjectSponsorEntity newEntity = factory.manufacturePojo(ProjectSponsorEntity.class); newEntity.setId(entity.getId()); projectSponsorPersistence.update(newEntity); ProjectSponsorEntity resp = em.find(ProjectSponsorEntity.class, entity.getId()); Assert.assertEquals(newEntity.getName(), resp.getName()); Assert.assertEquals(newEntity.getCompany(), resp.getCompany()); Assert.assertEquals(newEntity.getPicture(), resp.getPicture()); }