Package org.dozer.vo.mapid

Examples of org.dozer.vo.mapid.AContainer


  @Test
  public void testMapIdWithSubClasses() {
    mapper = getMapper(new String[] { "inheritanceMapping4.xml" });

    AContainer src = new AContainer();
    src.setAProperty(getA());

    BContainer dest = (BContainer) mapper.map(src, BContainer.class);

    assertNotNull("B property of dest should be instantiated if mapping by map-id works", dest
        .getBProperty());

    // Remap to each other to test bi-directional mapping
    AContainer mappedSrc = (AContainer) mapper.map(dest, AContainer.class);
    BContainer mappedDest = (BContainer) mapper.map(mappedSrc, BContainer.class);

    assertEquals("objects not mapped correctly bi-directional", dest, mappedDest);
  }
View Full Code Here


  @Test
  public void testMapIdWithSubClasses() {
    mapper = getMapper("inheritanceMapping4.xml");

    AContainer src = new AContainer();
    src.setAProperty(getA());

    BContainer dest = mapper.map(src, BContainer.class);

    assertNotNull("B property of dest should be instantiated if mapping by map-id works", dest
        .getBProperty());

    // Remap to each other to test bi-directional mapping
    AContainer mappedSrc = mapper.map(dest, AContainer.class);
    BContainer mappedDest = mapper.map(mappedSrc, BContainer.class);

    assertEquals("objects not mapped correctly bi-directional", dest, mappedDest);
  }
View Full Code Here

TOP

Related Classes of org.dozer.vo.mapid.AContainer

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.