Package org.dozer.vo.generics.deepindex

Examples of org.dozer.vo.generics.deepindex.HeadOfHouseHold


    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);

    HeadOfHouseHold dest = mapper.map(source, HeadOfHouseHold.class);
    assertEquals((source.getFamilyMembers().get(0)).getFirstName(), dest.getFirstName());
    assertEquals((source.getFamilyMembers().get(0)).getLastName(), dest.getLastName());
    assertEquals((source.getFamilyMembers().get(0)).getSalary(), dest.getSalary());
    assertEquals(source.getPets()[1].getPetName(), dest.getPetName());
    assertEquals(String.valueOf(source.getPets()[1].getPetAge()), dest.getPetAge());
    assertEquals(source.getPets()[1].getOffSpring()[2].getPetName(), dest.getOffSpringName());
  }
View Full Code Here


  }

  @Test
  public void testDeepMapInvIndexed() throws Exception {
    Mapper mapper = getMapper(new String[] { "genericCollectionMapping.xml" });
    HeadOfHouseHold source = newInstance(HeadOfHouseHold.class);
    source.setFirstName("Tom");
    source.setLastName("Roy");
    source.setPetName("Ronny");
    source.setSalary(new Integer(15000));
    source.setPetAge("2");
    source.setOffSpringName("Ronny2");

    Family dest = newInstance(Family.class);
    mapper.map(source, dest);

    assertEquals((dest.getFamilyMembers().get(0)).getFirstName(), source.getFirstName());
    assertEquals((dest.getFamilyMembers().get(0)).getLastName(), source.getLastName());
    assertEquals((dest.getFamilyMembers().get(0)).getSalary(), source.getSalary());
    assertEquals(dest.getPets()[1].getPetName(), source.getPetName());
    assertEquals(String.valueOf(dest.getPets()[1].getPetAge()), source.getPetAge());
    assertEquals(dest.getPets()[1].getOffSpring()[2].getPetName(), source.getOffSpringName());
  }
View Full Code Here

    myPets[1] = secondPet;

    // Save the pet details into the source object
    source.setPets(myPets);

    HeadOfHouseHold dest = mapper.map(source, HeadOfHouseHold.class);
    assertEquals((source.getFamilyMembers().get(0)).getFirstName(), dest.getFirstName());
    assertEquals((source.getFamilyMembers().get(0)).getLastName(), dest.getLastName());
    assertEquals((source.getFamilyMembers().get(0)).getSalary(), dest.getSalary());
    assertEquals(source.getPets()[1].getPetName(), dest.getPetName());
    assertEquals(String.valueOf(source.getPets()[1].getPetAge()), dest.getPetAge());
    assertEquals(source.getPets()[1].getOffSpring()[2].getPetName(), dest.getOffSpringName());
  }
View Full Code Here

  }

  @Test
  public void testDeepMapInvIndexed() throws Exception {
    Mapper mapper = getMapper(new String[] { "genericCollectionMapping.xml" });
    HeadOfHouseHold source = newInstance(HeadOfHouseHold.class);
    source.setFirstName("Tom");
    source.setLastName("Roy");
    source.setPetName("Ronny");
    source.setSalary(new Integer(15000));
    source.setPetAge("2");
    source.setOffSpringName("Ronny2");

    Family dest = newInstance(Family.class);
    mapper.map(source, dest);

    assertEquals((dest.getFamilyMembers().get(0)).getFirstName(), source.getFirstName());
    assertEquals((dest.getFamilyMembers().get(0)).getLastName(), source.getLastName());
    assertEquals((dest.getFamilyMembers().get(0)).getSalary(), source.getSalary());
    assertEquals(dest.getPets()[1].getPetName(), source.getPetName());
    assertEquals(String.valueOf(dest.getPets()[1].getPetAge()), source.getPetAge());
    assertEquals(dest.getPets()[1].getOffSpring()[2].getPetName(), source.getOffSpringName());
  }
View Full Code Here

TOP

Related Classes of org.dozer.vo.generics.deepindex.HeadOfHouseHold

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.