当前位置: 首页>>代码示例>>Java>>正文


Java PodamFactory类代码示例

本文整理汇总了Java中uk.co.jemos.podam.api.PodamFactory的典型用法代码示例。如果您正苦于以下问题:Java PodamFactory类的具体用法?Java PodamFactory怎么用?Java PodamFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PodamFactory类属于uk.co.jemos.podam.api包,在下文中一共展示了PodamFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:25,代码来源:OfertasPersistenceTest.java

示例2: updateOfertaTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
/**
 * Prueba para actualizar un Oferta.
 *
 * @generated
 */
@Test
public void updateOfertaTest() {
    OfertaEntity entity = data.get(0);
    PodamFactory factory = new PodamFactoryImpl();
    OfertaEntity newEntity = factory.manufacturePojo(OfertaEntity.class);
    newEntity.setId(entity.getId());

    ofertaPersistence.update(newEntity);

    OfertaEntity resp = em.find(OfertaEntity.class, entity.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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:26,代码来源:OfertasPersistenceTest.java

示例3: 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());
    
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:25,代码来源:UsuarioPersistenceTest.java

示例4: updateUsuarioTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
/**
 * Prueba para actualizar un Book.
 *
 * @generated
 */
@Test
public void updateUsuarioTest() {
    UsuarioEntity entity = data.get(0);
    PodamFactory factory = new PodamFactoryImpl();
    UsuarioEntity newEntity = factory.manufacturePojo(UsuarioEntity.class);
    newEntity.setId(entity.getId());

    usuarioPersistence.update(newEntity);

    UsuarioEntity resp = em.find(UsuarioEntity.class, entity.getId());

    Assert.assertEquals(newEntity.getNombres(), resp.getNombres());
    Assert.assertEquals(newEntity.getFechaNaciemiento().getDay(), resp.getFechaNaciemiento().getDay());
    Assert.assertEquals(newEntity.getCondicionFisica(), resp.getCondicionFisica());
    Assert.assertEquals(newEntity.getLogin(), resp.getLogin());
    Assert.assertEquals(newEntity.getGuia(), resp.getGuia());
    Assert.assertEquals(newEntity.getFormacion(), resp.getFormacion());
    Assert.assertEquals(newEntity.getExperiencia(), resp.getExperiencia());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:25,代码来源:UsuarioPersistenceTest.java

示例5: createPaseoTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
@Test
public void createPaseoTest(){
    PodamFactory factory = new PodamFactoryImpl();
    PaseoEntity paseo = factory.manufacturePojo(PaseoEntity.class);
    PaseoEntity result = persitence.create(paseo);
    assertNotNull(result);
    
    PaseoEntity entity = em.find(PaseoEntity.class, result.getId());
    
    assertEquals(result.getId(),entity.getId());
    
    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());
    
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:25,代码来源:PaseosPersitenceTest.java

示例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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:31,代码来源:PaseosPersitenceTest.java

示例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);
    }
    
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:22,代码来源:FotoPersistenceTest.java

示例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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:22,代码来源:FotoPersistenceTest.java

示例9: createVisitaTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
/**
 * Prueba para crear un Book.
 *
 * @generated
 */
@Test
public void createVisitaTest() {
    PodamFactory factory = new PodamFactoryImpl();
    VisitaEntity newEntity = factory.manufacturePojo(VisitaEntity.class);
    VisitaEntity result = VisitaPersistence.create(newEntity);

    Assert.assertNotNull(result);

    VisitaEntity entity = em.find(VisitaEntity.class, result.getId());

    Assert.assertEquals(newEntity.getId(), entity.getId());
    Assert.assertArrayEquals(newEntity.getFotos().toArray(), entity.getFotos().toArray());
    Assert.assertEquals(newEntity.getOferta(), entity.getOferta());
    Assert.assertEquals(newEntity.getUsuario(), entity.getUsuario());
    Assert.assertEquals(newEntity.getComentario(), entity.getComentario());
    Assert.assertEquals(newEntity.getCalificacion(), entity.getCalificacion());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:23,代码来源:VisitaPersistenceTest.java

示例10: 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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:24,代码来源:VisitaPersistenceTest.java

示例11: createOfertaTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
/**
 * Prueba para crear una oferta
 */
@Test
public void createOfertaTest() throws BusinessLogicException {
    PodamFactory factory = new PodamFactoryImpl();
    OfertaEntity entity = factory.manufacturePojo(OfertaEntity.class);
    OfertaEntity result =null;
    entity.setFecha(agregaDias(hoy,5));
    result = ofertaLogic.createOferta(entity);
    
    Assert.assertNotNull(result);
    Assert.assertEquals(result.getFecha().getDay(), entity.getFecha().getDay());
    Assert.assertEquals(result.getFecha().getMonth(), entity.getFecha().getMonth());
    Assert.assertEquals(result.getFecha().getYear(), entity.getFecha().getYear());
    Assert.assertEquals(result.getGuia(), entity.getGuia());
    Assert.assertEquals(result.getPaseo(), entity.getPaseo());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:19,代码来源:OfertaLogicTest.java

示例12: updateOfertaTest

import uk.co.jemos.podam.api.PodamFactory; //导入依赖的package包/类
/**
 * Prueba para actualizar una oferta
 */
@Test
public void updateOfertaTest() throws BusinessLogicException {
    OfertaEntity entity = data.get(0);
    PodamFactory factory = new PodamFactoryImpl();
    OfertaEntity pojoEntity = factory.manufacturePojo(OfertaEntity.class);
    pojoEntity.setId(entity.getId());
    pojoEntity.setFecha(agregaDias(hoy,5));
    ofertaLogic.updateOferta(pojoEntity);

    OfertaEntity resp = em.find(OfertaEntity.class, entity.getId());

    Assert.assertEquals(pojoEntity.getFecha().getDay(), resp.getFecha().getDay());
    Assert.assertEquals(pojoEntity.getFecha().getMonth(), resp.getFecha().getMonth());
    Assert.assertEquals(pojoEntity.getFecha().getYear(), resp.getFecha().getYear());
    Assert.assertEquals(pojoEntity.getGuia(), resp.getGuia());
    Assert.assertEquals(pojoEntity.getPaseo(), resp.getPaseo());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:21,代码来源:OfertaLogicTest.java

示例13: 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());
    
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:24,代码来源:UsuarioLogicTest.java

示例14: 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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:26,代码来源:UsuarioLogicTest.java

示例15: 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());
}
 
开发者ID:Uniandes-ISIS2603-backup,项目名称:201710-paseos_01,代码行数:30,代码来源:VisitaLogicTest.java


注:本文中的uk.co.jemos.podam.api.PodamFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。