Package org.dozer.vo.deep

Examples of org.dozer.vo.deep.HomeDescription


  @Test
  public void testMappingNoDestSpecified() throws Exception {
    // Map
    House src = testDataFactory.getHouse();
    HomeDescription dest = mapper.map(src, HomeDescription.class);
    House src2 = mapper.map(dest, House.class);
    HomeDescription dest2 = mapper.map(src2, HomeDescription.class);

    long[] prim = { 1, 2, 3, 1, 2, 3 };
    // cumulative relationship
    dest.setPrim(prim);
    assertEquals(dest, dest2);
View Full Code Here


  }

  @Test
  public void testDeepProperties() throws Exception {
    House src = testDataFactory.getHouse();
    HomeDescription dest = mapper.map(src, HomeDescription.class);
    House src2 = mapper.map(dest, House.class);
    HomeDescription dest2 = mapper.map(src2, HomeDescription.class);

    long[] prim = { 1, 2, 3, 1, 2, 3 };
    // cumulative relationship
    dest.setPrim(prim);
    assertEquals(dest, dest2);
View Full Code Here

    mapper = getMapper(new String[] { "dozerBeanMapping.xml" });
    House house = newInstance(House.class);
    Person owner = newInstance(Person.class);
    owner.setYourName("myName");
    house.setOwner(owner);
    HomeDescription desc = mapper.map(house, HomeDescription.class);
    assertEquals(desc.getDescription().getMyName(), "myName");
    // make sure we don't map back
    House house2 = mapper.map(desc, House.class);
    assertNull(house2.getOwner().getYourName());
  }
View Full Code Here

    mapper = getMapper(new String[] { "dozerBeanMapping.xml" });
    House house = newInstance(House.class);
    Person owner = newInstance(Person.class);
    owner.setYourName("myName");
    house.setOwner(owner);
    HomeDescription desc = mapper.map(house, HomeDescription.class);
    assertEquals(desc.getDescription().getMyName(), "myName");
    // make sure we don't map back
    House house2 = mapper.map(desc, House.class);
    assertNull(house2.getOwner().getYourName());
  }
View Full Code Here

  @Test
  public void testMappingNoDestSpecified() throws Exception {
    // Map
    House src = testDataFactory.getHouse();
    HomeDescription dest = mapper.map(src, HomeDescription.class);
    House src2 = mapper.map(dest, House.class);
    HomeDescription dest2 = mapper.map(src2, HomeDescription.class);

    long[] prim = { 1, 2, 3, 1, 2, 3 };
    // cumulative relationship
    dest.setPrim(prim);
    assertEquals(dest, dest2);
View Full Code Here

  }

  @Test
  public void testDeepProperties() throws Exception {
    House src = testDataFactory.getHouse();
    HomeDescription dest = mapper.map(src, HomeDescription.class);
    House src2 = mapper.map(dest, House.class);
    HomeDescription dest2 = mapper.map(src2, HomeDescription.class);

    long[] prim = { 1, 2, 3, 1, 2, 3 };
    // cumulative relationship
    dest.setPrim(prim);
    assertEquals(dest, dest2);
View Full Code Here

TOP

Related Classes of org.dozer.vo.deep.HomeDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.