Package org.dozer.vo

Examples of org.dozer.vo.Individual


  }

  @Test
  public void testGlobalCustomConverter() {
    Individual individual = newInstance(Individual.class);
    individual.setUsername("ABC");
    Fruit result = mapper.map(individual, Fruit.class, "1");
    assertNotNull("", result.getName());
    assertTrue(result.getName().startsWith("ABC-null"));
  }
View Full Code Here


    assertTrue(result.getName().startsWith("ABC-null"));
  }

  @Test
  public void testGlobalCustomConverter_ParamProvided() {
    Individual individual = newInstance(Individual.class);
    individual.setUsername("ABC");
    Fruit result = mapper.map(individual, Fruit.class, "2");
    assertNotNull("", result.getName());
    assertTrue(result.getName().startsWith("ABC-PARAM"));
  }
View Full Code Here

  public void testMap3() {
    List<String> userNames = newInstance(ArrayList.class);
    userNames.add("username1");
    userNames.add("username2");

    Individual nestedIndividual = newInstance(Individual.class);
    nestedIndividual.setUsername("nestedusername");

    String[] secondNames = new String[3];
    secondNames[0] = "secondName1";
    secondNames[1] = "secondName2";
    secondNames[2] = "secondName3";
View Full Code Here

  public void testMap3() {
    List<String> userNames = newInstance(ArrayList.class);
    userNames.add("username1");
    userNames.add("username2");

    Individual nestedIndividual = newInstance(Individual.class);
    nestedIndividual.setUsername("nestedusername");

    String[] secondNames = new String[3];
    secondNames[0] = "secondName1";
    secondNames[1] = "secondName2";
    secondNames[2] = "secondName3";
View Full Code Here

  }

  @Test
  public void testGlobalCustomConverter() {
    Individual individual = newInstance(Individual.class);
    individual.setUsername("ABC");
    Fruit result = mapper.map(individual, Fruit.class, "1");
    assertNotNull("", result.getName());
    assertTrue(result.getName().startsWith("ABC-null"));
  }
View Full Code Here

    assertTrue(result.getName().startsWith("ABC-null"));
  }

  @Test
  public void testGlobalCustomConverter_ParamProvided() {
    Individual individual = newInstance(Individual.class);
    individual.setUsername("ABC");
    Fruit result = mapper.map(individual, Fruit.class, "2");
    assertNotNull("", result.getName());
    assertTrue(result.getName().startsWith("ABC-PARAM"));
  }
View Full Code Here

TOP

Related Classes of org.dozer.vo.Individual

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.