本文整理汇总了Java中uk.co.jemos.podam.api.PodamFactory.manufacturePojo方法的典型用法代码示例。如果您正苦于以下问题:Java PodamFactory.manufacturePojo方法的具体用法?Java PodamFactory.manufacturePojo怎么用?Java PodamFactory.manufacturePojo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uk.co.jemos.podam.api.PodamFactory
的用法示例。
在下文中一共展示了PodamFactory.manufacturePojo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateVisitaTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un Book.
*
* @generated
*/
@Test
public void updateVisitaTest() {
VisitaEntity entity = data.get(3);
PodamFactory factory = new PodamFactoryImpl();
VisitaEntity pojoEntity = factory.manufacturePojo(VisitaEntity.class);
pojoEntity.setId(entity.getId());
pojoEntity.setOferta(entity.getOferta());
pojoEntity.setUsuario(entity.getUsuario());
VisitaEntity resp = null;
try {
resp = visitaLogic.updateVisita(pojoEntity);
} catch (BusinessLogicException ex) {
Assert.fail(ex.getMessage());
Logger.getLogger(VisitaLogicTest.class.getName()).log(Level.SEVERE, null, ex);
}
Assert.assertNotNull(resp);
Assert.assertEquals(pojoEntity.getId(), resp.getId());
Assert.assertEquals(pojoEntity.getOferta().getId(), resp.getOferta().getId());
Assert.assertEquals(pojoEntity.getUsuario().getId(), resp.getUsuario().getId());
Assert.assertEquals(pojoEntity.getComentario(), resp.getComentario());
Assert.assertEquals(pojoEntity.getCalificacion(), resp.getCalificacion());
}
示例2: createOfertaTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear una Oferta.
*
* @generated
*/
@Test
public void createOfertaTest() {
PodamFactory factory = new PodamFactoryImpl();
OfertaEntity newEntity = factory.manufacturePojo(OfertaEntity.class);
OfertaEntity result = ofertaPersistence.create(newEntity);
Assert.assertNotNull(result);
OfertaEntity entity = em.find(OfertaEntity.class, result.getId());
Assert.assertEquals(newEntity.getFecha().getDay(), entity.getFecha().getDay());
Assert.assertEquals(newEntity.getFecha().getMonth(), entity.getFecha().getMonth());
Assert.assertEquals(newEntity.getFecha().getYear(), entity.getFecha().getYear());
Assert.assertEquals(newEntity.getGuia(), entity.getGuia());
Assert.assertEquals(newEntity.getId(), entity.getId());
Assert.assertEquals(newEntity.getInscritos(), entity.getInscritos());
Assert.assertEquals(newEntity.getPaseo(), entity.getPaseo());
Assert.assertEquals(newEntity.getVisitas(), entity.getVisitas());
}
示例3: createVisitaTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear un Book.
*
* @generated
*/
@Test
public void createVisitaTest() {
PodamFactory factory = new PodamFactoryImpl();
VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);
VisitaEntity result = null;
try {
result = visitaLogic.createVisita(entity);
data.add(result);
} catch (BusinessLogicException ex) {
Assert.fail(ex.getMessage());
Logger.getLogger(VisitaLogicTest.class.getName()).log(Level.SEVERE, null, ex);
}
Assert.assertNotNull(result);
Assert.assertEquals(result.getId(), entity.getId());
Assert.assertArrayEquals(result.getFotos().toArray(), entity.getFotos().toArray());
Assert.assertNull(result.getOferta());
Assert.assertNull(result.getUsuario());
Assert.assertEquals(result.getComentario(), entity.getComentario());
Assert.assertEquals(result.getCalificacion(), entity.getCalificacion());
}
示例4: createUsuarioTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear un Book.
*
* @generated
*/
@Test
public void createUsuarioTest() {
PodamFactory factory = new PodamFactoryImpl();
UsuarioEntity newEntity = factory.manufacturePojo(UsuarioEntity.class);
UsuarioEntity result = usuarioPersistence.create(newEntity);
Assert.assertNotNull(result);
UsuarioEntity entity = em.find(UsuarioEntity.class, result.getId());
Assert.assertEquals(newEntity.getNombres(), entity.getNombres());
Assert.assertEquals(newEntity.getFechaNaciemiento().getDay(), entity.getFechaNaciemiento().getDay());
Assert.assertEquals(newEntity.getCondicionFisica(), entity.getCondicionFisica());
Assert.assertEquals(newEntity.getLogin(), entity.getLogin());
Assert.assertEquals(newEntity.getGuia(), entity.getGuia());
Assert.assertEquals(newEntity.getFormacion(), entity.getFormacion());
Assert.assertEquals(newEntity.getExperiencia(), entity.getExperiencia());
}
示例5: entityDtoentity
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
@Test
public void entityDtoentity() {
PodamFactory factory = new PodamFactoryImpl();
PaseoEntity paseo = factory.manufacturePojo(PaseoEntity.class);
PaseoDetailDTO paseoDto = new PaseoDetailDTO(paseo);
PaseoEntity entity = paseoDto.toEntity();
assertEquals(paseo.getAlmuerzo(), entity.getAlmuerzo());
assertEquals(paseo.getCondicionFisica(), entity.getCondicionFisica());
assertEquals(paseo.getCosto(), entity.getCosto());
assertEquals(paseo.getDescripcion(), entity.getDescripcion());
assertEquals(paseo.getDestino(), entity.getDestino());
assertEquals(paseo.getFotos(), entity.getFotos());
assertEquals(paseo.getNumeroMaximo(), entity.getNumeroMaximo());
assertEquals(paseo.getNumeroMinimo(), entity.getNumeroMinimo());
assertEquals(paseo.getOfertas(), entity.getOfertas());
assertEquals(paseo.getTematica(), entity.getTematica());
assertEquals(paseo.getTransporte(), entity.getTransporte());
}
示例6: updateBookTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un Paseo.
*
* @generated
*/
@Test
public void updateBookTest() {
PaseoEntity ent = data.get(0);
PodamFactory factory = new PodamFactoryImpl();
PaseoEntity entity = factory.manufacturePojo(PaseoEntity.class);
entity.setId(ent.getId());
persitence.update(entity);
PaseoEntity paseo = em.find(PaseoEntity.class, ent.getId());
assertNotNull(paseo);
assertEquals(paseo.getAlmuerzo(),entity.getAlmuerzo());
assertEquals(paseo.getCondicionFisica(),entity.getCondicionFisica());
assertEquals(paseo.getCosto(),entity.getCosto());
assertEquals(paseo.getDescripcion(),entity.getDescripcion());
assertEquals(paseo.getDestino(),entity.getDestino());
assertEquals(paseo.getFotos(),entity.getFotos());
assertEquals(paseo.getNumeroMaximo(),entity.getNumeroMaximo());
assertEquals(paseo.getNumeroMinimo(),entity.getNumeroMinimo());
assertEquals(paseo.getOfertas(),entity.getOfertas());
assertEquals(paseo.getTematica(),entity.getTematica());
assertEquals(paseo.getTransporte(),entity.getTransporte());
}
示例7: insertData
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Inserta los datos iniciales para el correcto funcionamiento de las
* pruebas.
*
* @generated
*/
private void insertData()
{
PodamFactory fac = new PodamFactoryImpl();
VisitaEntity vis = fac.manufacturePojo(VisitaEntity.class);
em.persist(vis);
visit = vis;
for (int i = 0; i < 3; i++) {
PodamFactory factory = new PodamFactoryImpl();
FotoEntity entity = factory.manufacturePojo(FotoEntity.class);
entity.setVisita(visit);
em.persist(entity);
data.add(entity);
}
}
示例8: createFotoTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear una Foto.
*
* @generated
*/
@Test
public void createFotoTest()
{
PodamFactory factory = new PodamFactoryImpl();
FotoEntity newEntity = factory.manufacturePojo(FotoEntity.class);
newEntity.setVisita(visit);
FotoEntity result = fotoPersistence.create(newEntity);
Assert.assertNotNull("El resultado no puede ser nulo",result);
FotoEntity entity = em.find(FotoEntity.class, result.getId());
Assert.assertEquals("El formato de la foto no coincide",newEntity.getFormato(), entity.getFormato());
Assert.assertEquals("Los bytes de la imagen no coinciden",new String(newEntity.getValor()), new String(entity.getValor()));
Assert.assertEquals("La referencia a la visita no coincide",newEntity.getVisita().getId(), entity.getVisita().getId());
}
示例9: updateVisitaTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un Book.
*
* @generated
*/
@Test
public void updateVisitaTest() {
VisitaEntity entity = data.get(0);
PodamFactory factory = new PodamFactoryImpl();
VisitaEntity newEntity = factory.manufacturePojo(VisitaEntity.class);
newEntity.setId(entity.getId());
VisitaPersistence.update(newEntity);
VisitaEntity resp = em.find(VisitaEntity.class, entity.getId());
Assert.assertEquals(newEntity.getId(), resp.getId());
Assert.assertArrayEquals(newEntity.getFotos().toArray(), resp.getFotos().toArray());
Assert.assertEquals(newEntity.getOferta(), resp.getOferta());
Assert.assertEquals(newEntity.getUsuario(), resp.getUsuario());
Assert.assertEquals(newEntity.getComentario(), resp.getComentario());
Assert.assertEquals(newEntity.getCalificacion(), resp.getCalificacion());
}
示例10: updateUsuarioTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un Book.
*
* @generated
*/
@Test
public void updateUsuarioTest() throws BusinessLogicException {
UsuarioEntity entity = data.get(0);
PodamFactory factory = new PodamFactoryImpl();
UsuarioEntity pojoEntity = factory.manufacturePojo(UsuarioEntity.class);
pojoEntity.setId(entity.getId());
usuarioLogic.updateUsuario(pojoEntity);
UsuarioEntity resp = em.find(UsuarioEntity.class, entity.getId());
Assert.assertEquals(pojoEntity.getNombres(), resp.getNombres());
Assert.assertEquals(pojoEntity.getApellidos(), resp.getApellidos());
Assert.assertEquals(pojoEntity.getCondicionFisica(), resp.getCondicionFisica());
Assert.assertEquals(pojoEntity.getFechaNaciemiento().getDay(), resp.getFechaNaciemiento().getDay());
Assert.assertEquals(pojoEntity.getFechaNaciemiento().getMonth(), resp.getFechaNaciemiento().getMonth());
Assert.assertEquals(pojoEntity.getExperiencia(), resp.getExperiencia());
Assert.assertEquals(pojoEntity.getFormacion(), resp.getFormacion());
Assert.assertEquals(pojoEntity.getGuia(), resp.getGuia());
}
示例11: createUsuarioTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear un Book.
*
* @generated
*/
@Test
public void createUsuarioTest() throws BusinessLogicException {
PodamFactory factory = new PodamFactoryImpl();
UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);
UsuarioEntity result =null;
result = usuarioLogic.createUsuario(entity);
Assert.assertNotNull(result);
Assert.assertEquals(result.getNombres(), entity.getNombres());
Assert.assertEquals(result.getApellidos(), entity.getApellidos());
Assert.assertEquals(result.getCondicionFisica(), entity.getCondicionFisica());
Assert.assertEquals(result.getFechaNaciemiento().getDay(), entity.getFechaNaciemiento().getDay());
Assert.assertEquals(result.getFechaNaciemiento().getMonth(), entity.getFechaNaciemiento().getMonth());
Assert.assertEquals(result.getExperiencia(), entity.getExperiencia());
Assert.assertEquals(result.getFormacion(), entity.getFormacion());
Assert.assertEquals(result.getGuia(), entity.getGuia());
}
示例12: DtoEntityDto
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
@Test
public void DtoEntityDto() {
PodamFactory factory = new PodamFactoryImpl();
PaseoDetailDTO paseo = factory.manufacturePojo(PaseoDetailDTO.class);
PaseoEntity paseoE = paseo.toEntity();
PaseoDetailDTO entity = new PaseoDetailDTO(paseoE);
entity.llenarListas(paseoE);
assertEquals(paseo.getAlmuerzo(), entity.getAlmuerzo());
assertEquals(paseo.getCondicionFisica(), entity.getCondicionFisica());
assertEquals(paseo.getCosto(), entity.getCosto());
assertEquals(paseo.getDescripcion(), entity.getDescripcion());
assertEquals(paseo.getDestino(), entity.getDestino());
assertEquals(paseo.getNumeroMaximo(), entity.getNumeroMaximo());
assertEquals(paseo.getNumeroMinimo(), entity.getNumeroMinimo());
assertEquals(paseo.getTematica(), entity.getTematica());
assertEquals(paseo.getTransporte(), entity.getTransporte());
assertEquals(paseo.getOfertas().size(), entity.getOfertas().size());
}
示例13: updateProductTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un Product.
*
* @generated
*/
@Test
public void updateProductTest() {
ProductEntity entity = data.get(0);
PodamFactory factory = new PodamFactoryImpl();
ProductEntity newEntity = factory.manufacturePojo(ProductEntity.class);
newEntity.setId(entity.getId());
productPersistence.update(newEntity);
ProductEntity resp = em.find(ProductEntity.class, entity.getId());
Assert.assertEquals(newEntity.getName(), resp.getName());
Assert.assertEquals(newEntity.getPrice(), resp.getPrice());
}
示例14: createPaymentMethodTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para crear un PaymentMethod.
*
* @generated
*/
@Test
public void createPaymentMethodTest() {
PodamFactory factory = new PodamFactoryImpl();
PaymentMethodEntity newEntity = factory.manufacturePojo(PaymentMethodEntity.class);
newEntity.setClient(fatherEntity);
PaymentMethodEntity result = paymentMethodPersistence.create(newEntity);
Assert.assertNotNull(result);
PaymentMethodEntity entity = em.find(PaymentMethodEntity.class, result.getId());
Assert.assertEquals(newEntity.getName(), entity.getName());
Assert.assertEquals(newEntity.getCardType(), entity.getCardType());
Assert.assertEquals(newEntity.getCardNumber(), entity.getCardNumber());
Assert.assertEquals(newEntity.getSecurityCode(), entity.getSecurityCode());
Assert.assertEquals(newEntity.getExpirationMonth(), entity.getExpirationMonth());
Assert.assertEquals(newEntity.getExpirationYear(), entity.getExpirationYear());
}
示例15: updatePaymentMethodTest
import uk.co.jemos.podam.api.PodamFactory; //导入方法依赖的package包/类
/**
* Prueba para actualizar un PaymentMethod.
*/
@Test
public void updatePaymentMethodTest() {
PaymentMethodEntity entity = data.get(0);
PodamFactory factory = new PodamFactoryImpl();
PaymentMethodEntity newEntity = factory.manufacturePojo(PaymentMethodEntity.class);
newEntity.setId(entity.getId());
paymentMethodPersistence.update(newEntity);
PaymentMethodEntity resp = em.find(PaymentMethodEntity.class, entity.getId());
Assert.assertEquals(newEntity.getName(), resp.getName());
Assert.assertEquals(newEntity.getCardType(), resp.getCardType());
Assert.assertEquals(newEntity.getCardNumber(), resp.getCardNumber());
Assert.assertEquals(newEntity.getSecurityCode(), resp.getSecurityCode());
Assert.assertEquals(newEntity.getExpirationMonth(), resp.getExpirationMonth());
Assert.assertEquals(newEntity.getExpirationYear(), resp.getExpirationYear());
}