Package org.dozer.vo

Examples of org.dozer.vo.Fruit


  @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


  @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

    mapper = getMapper(new String[] { "removeOrphansMapping.xml" });

    MyClassA myClassA = new MyClassA();
    MyClassB myClassB = new MyClassB();

    Fruit apple = new Fruit();
    apple.setName("Apple");
    Fruit banana = new Fruit();
    banana.setName("Banana");
    Fruit grape = new Fruit();
    grape.setName("Grape");
    Fruit orange = new Fruit();
    orange.setName("Orange");
    Fruit kiwiFruit = new Fruit();
    kiwiFruit.setName("Kiwi Fruit");

    List<Fruit> srcFruits = new ArrayList<Fruit>();
    srcFruits.add(apple);
    srcFruits.add(banana);
    srcFruits.add(kiwiFruit);
View Full Code Here

    mapper = getMapper("removeOrphansMapping.xml");

    MyClassA myClassA = new MyClassA();
    MyClassB myClassB = new MyClassB();

    Fruit apple = new Fruit();
    apple.setName("Apple");
    Fruit banana = new Fruit();
    banana.setName("Banana");
    Fruit grape = new Fruit();
    grape.setName("Grape");
    Fruit orange = new Fruit();
    orange.setName("Orange");
    Fruit kiwiFruit = new Fruit();
    kiwiFruit.setName("Kiwi Fruit");

    List<Fruit> srcFruits = new ArrayList<Fruit>();
    srcFruits.add(apple);
    srcFruits.add(banana);
    srcFruits.add(kiwiFruit);
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

  @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.Fruit

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.