Package org.dozer.vo.recursive

Examples of org.dozer.vo.recursive.ClassAAPrime


    ClassAA testAA = createTestClassAA();
    // the == is on purpose, we test that the referenced parent of the first item of the subs is the parent instance
    // itself
    ClassB testClassB = testAA.getSubs().iterator().next();
    assertTrue(testClassB.getParent() == testAA);
    ClassAAPrime testAAPrime = mapper.map(testAA, ClassAAPrime.class, null);
    // testing the new dozer3.0 bi-directionnal reference through a set
    assertEquals(testAA.getSubs().size(), testAAPrime.getSubs().size());
    // the equality is true at the data level
    ClassBPrime testClassBPrime = testAAPrime.getSubs().iterator().next();
    assertTrue(testClassBPrime.getParent().equals(testAAPrime));
    // we want the referenced parent of the first item of the subs to be the parent instance itself
    ClassBPrime testClassBPrime2 = testAAPrime.getSubs().iterator().next();
    assertTrue(testClassBPrime2.getParent() == testAAPrime);
  }
View Full Code Here


    ClassAA testAA = createTestClassAA();
    // the == is on purpose, we test that the referenced parent of the first item of the subs is the parent instance
    // itself
    ClassB testClassB = testAA.getSubs().iterator().next();
    assertTrue(testClassB.getParent() == testAA);
    ClassAAPrime testAAPrime = mapper.map(testAA, ClassAAPrime.class, null);
    // testing the new dozer3.0 bi-directionnal reference through a set
    assertEquals(testAA.getSubs().size(), testAAPrime.getSubs().size());
    // the equality is true at the data level
    ClassBPrime testClassBPrime = testAAPrime.getSubs().iterator().next();
    assertTrue(testClassBPrime.getParent().equals(testAAPrime));
    // we want the referenced parent of the first item of the subs to be the parent instance itself
    ClassBPrime testClassBPrime2 = testAAPrime.getSubs().iterator().next();
    assertTrue(testClassBPrime2.getParent() == testAAPrime);
  }
View Full Code Here

TOP

Related Classes of org.dozer.vo.recursive.ClassAAPrime

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.