Package org.dozer.vo

Examples of org.dozer.vo.B


  @Test
  public void testNotNullNestedIndexAtoD() {
    C c = newInstance(C.class);
    c.setValue("value1");
    B b = newInstance(B.class);
    b.setCs(new C[] { c });
    A a = newInstance(A.class);
    a.setB(b);

    D d = mapper.map(a, D.class);
    assertEquals("value not translated", "value1", d.getValue());
View Full Code Here


  }

  @Test
  public void testSimple() {
    HashMap source = new HashMap();
    source.put("key", new B());
    A dest = mapper.map(source, A.class, NULL);
    assertNotNull(dest);
    assertNotNull(dest.getB());
  }
View Full Code Here

  }

  @Test
  public void testSimpleReverse() {
    A source = new A();
    source.setB(new B());
    Map dest = mapper.map(source, HashMap.class, NULL);
    assertNotNull(dest);
    assertTrue(dest.containsKey("key"));
    assertNotNull(dest.get("key"));
  }
View Full Code Here

  public void testTwiceObjectToObjectConvert() {
    DozerBeanMapper mapper = new DozerBeanMapper();
    Mapper mappingProcessor = mapper.getMappingProcessor();

    A src = new A();
    src.setB(new B());

    A dest1 = new A();
    mappingProcessor.map(src, dest1);
    A dest2 = new A();
    mappingProcessor.map(src, dest2);
View Full Code Here

  }

  @Test
  public void testSimple() {
    HashMap source = new HashMap();
    source.put("key", new B());
    A dest = mapper.map(source, A.class, NULL);
    assertNotNull(dest);
    assertNotNull(dest.getB());
  }
View Full Code Here

  }

  @Test
  public void testSimpleReverse() {
    A source = new A();
    source.setB(new B());
    Map dest = mapper.map(source, HashMap.class, NULL);
    assertNotNull(dest);
    assertTrue(dest.containsKey("key"));
    assertNotNull(dest.get("key"));
  }
View Full Code Here

  @Test
  public void testNotNullNestedIndexAtoD() {
    C c = newInstance(C.class);
    c.setValue("value1");
    B b = newInstance(B.class);
    b.setCs(new C[] { c });
    A a = newInstance(A.class);
    a.setB(b);

    D d = mapper.map(a, D.class);
    assertEquals("value not translated", "value1", d.getValue());
View Full Code Here

TOP

Related Classes of org.dozer.vo.B

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.