Examples of DehydrateTestObject


Examples of org.dozer.vo.DehydrateTestObject

    mapper = getMapper("dozerBeanMapping.xml");
  }

  @Test
  public void testNoSourceValueIterateFieldMap() throws Exception {
    DehydrateTestObject inputDto = newInstance(DehydrateTestObject.class);
    HydrateTestObject hto = mapper.map(inputDto, HydrateTestObject.class);
    assertEquals(testDataFactory.getExpectedTestNoSourceValueIterateFieldMapHydrateTestObject(), hto);
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    HydrateTestObject dest = mapper.map(testDataFactory.getInputTestHydrateAndMoreDehydrateTestObject(), HydrateTestObject.class);
    // validate results
    assertEquals(testDataFactory.getExpectedTestHydrateAndMoreHydrateTestObject(), dest);

    // map it back
    DehydrateTestObject dhto = mapper.map(testDataFactory.getInputTestHydrateAndMoreHydrateTestObject(), DehydrateTestObject.class);
    assertEquals(testDataFactory.getExpectedTestHydrateAndMoreDehydrateTestObject(), dhto);
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    custom.setTwo("another");
    return custom;
  }

  public DehydrateTestObject getInputTestHydrateAndMoreDehydrateTestObject() {
    DehydrateTestObject custom = newInstance(DehydrateTestObject.class);
    Car car = newInstance(Car.class);
    car.setName("name");
    List<Car> carList = newInstance(ArrayList.class);
    carList.add(car);
    custom.setCars(carList);

    Apple apple = newInstance(Apple.class);
    apple.setName("name");
    Orange orange = newInstance(Orange.class);
    orange.setName("name");
    List<Fruit> fruitList = newInstance(ArrayList.class);
    fruitList.add(apple);
    fruitList.add(orange);
    custom.setFruit(fruitList);

    Van van = newInstance(Van.class);
    van.setName("name");
    List<Van> vanList = newInstance(ArrayList.class);
    vanList.add(van);
    custom.setVans(vanList);

    AppleComputer apple1 = newInstance(AppleComputer.class);
    apple1.setName("name");
    AppleComputer apple2 = newInstance(AppleComputer.class);
    apple2.setName("name");
    List<AppleComputer> compList = newInstance(ArrayList.class);
    compList.add(apple1);
    compList.add(apple2);
    custom.setAppleComputers(compList);

    Car iterateCar = newInstance(Car.class);
    iterateCar.setName("name");
    List<Car> iterateCarList = newInstance(ArrayList.class);
    iterateCarList.add(car);
    custom.setIterateCars(iterateCarList);

    iterateCar.setName("name");
    List<Car> iterateMoreCarList = newInstance(ArrayList.class);
    iterateMoreCarList.add(car);
    custom.setIterateMoreCars(iterateMoreCarList);

    return custom;
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    return hto;

  }

  public DehydrateTestObject getExpectedTestHydrateAndMoreDehydrateTestObject() {
    DehydrateTestObject custom = newInstance(DehydrateTestObject.class);
    Car car = newInstance(Car.class);
    car.setName("name");

    AppleComputer apple1 = newInstance(AppleComputer.class);
    apple1.setName("name");
    AppleComputer apple2 = newInstance(AppleComputer.class);
    apple2.setName("name");
    List<AppleComputer> compList = newInstance(ArrayList.class);
    compList.add(apple1);
    compList.add(apple2);
    custom.setAppleComputers(compList);
    List<Car> iterateCars = newInstance(ArrayList.class);
    iterateCars.add(car);
    custom.setIterateCars(iterateCars);
    return custom;
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    custom.setTwo("another");
    return custom;
  }

  public DehydrateTestObject getInputTestHydrateAndMoreDehydrateTestObject() {
    DehydrateTestObject custom = newInstance(DehydrateTestObject.class);
    Car car = newInstance(Car.class);
    car.setName("name");
    List<Car> carList = newInstance(ArrayList.class);
    carList.add(car);
    custom.setCars(carList);

    Apple apple = newInstance(Apple.class);
    apple.setName("name");
    Orange orange = newInstance(Orange.class);
    orange.setName("name");
    List<Fruit> fruitList = newInstance(ArrayList.class);
    fruitList.add(apple);
    fruitList.add(orange);
    custom.setFruit(fruitList);

    Van van = newInstance(Van.class);
    van.setName("name");
    List<Van> vanList = newInstance(ArrayList.class);
    vanList.add(van);
    custom.setVans(vanList);

    AppleComputer apple1 = newInstance(AppleComputer.class);
    apple1.setName("name");
    AppleComputer apple2 = newInstance(AppleComputer.class);
    apple2.setName("name");
    List<AppleComputer> compList = newInstance(ArrayList.class);
    compList.add(apple1);
    compList.add(apple2);
    custom.setAppleComputers(compList);

    Car iterateCar = newInstance(Car.class);
    iterateCar.setName("name");
    List<Car> iterateCarList = newInstance(ArrayList.class);
    iterateCarList.add(car);
    custom.setIterateCars(iterateCarList);

    iterateCar.setName("name");
    List<Car> iterateMoreCarList = newInstance(ArrayList.class);
    iterateMoreCarList.add(car);
    custom.setIterateMoreCars(iterateMoreCarList);

    return custom;
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    return hto;

  }

  public DehydrateTestObject getExpectedTestHydrateAndMoreDehydrateTestObject() {
    DehydrateTestObject custom = newInstance(DehydrateTestObject.class);
    Car car = newInstance(Car.class);
    car.setName("name");

    AppleComputer apple1 = newInstance(AppleComputer.class);
    apple1.setName("name");
    AppleComputer apple2 = newInstance(AppleComputer.class);
    apple2.setName("name");
    List<AppleComputer> compList = newInstance(ArrayList.class);
    compList.add(apple1);
    compList.add(apple2);
    custom.setAppleComputers(compList);
    List<Car> iterateCars = newInstance(ArrayList.class);
    iterateCars.add(car);
    custom.setIterateCars(iterateCars);
    return custom;
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    mapper = getMapper("dozerBeanMapping.xml");
  }

  @Test
  public void testNoSourceValueIterateFieldMap() throws Exception {
    DehydrateTestObject inputDto = newInstance(DehydrateTestObject.class);
    HydrateTestObject hto = mapper.map(inputDto, HydrateTestObject.class);
    assertEquals(testDataFactory.getExpectedTestNoSourceValueIterateFieldMapHydrateTestObject(), hto);
  }
View Full Code Here

Examples of org.dozer.vo.DehydrateTestObject

    HydrateTestObject dest = mapper.map(testDataFactory.getInputTestHydrateAndMoreDehydrateTestObject(), HydrateTestObject.class);
    // validate results
    assertEquals(testDataFactory.getExpectedTestHydrateAndMoreHydrateTestObject(), dest);

    // map it back
    DehydrateTestObject dhto = mapper.map(testDataFactory.getInputTestHydrateAndMoreHydrateTestObject(), DehydrateTestObject.class);
    assertEquals(testDataFactory.getExpectedTestHydrateAndMoreDehydrateTestObject(), dhto);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.