Package org.dozer.vo

Examples of org.dozer.vo.ArrayCustConverterObjPrime


    simple.setField1(String.valueOf(System.currentTimeMillis()));

    ArrayCustConverterObj src = newInstance(ArrayCustConverterObj.class);
    src.setField1(new SimpleObj[] { simple });

    ArrayCustConverterObjPrime dest = mapper.map(src, ArrayCustConverterObjPrime.class);

    // Custom converter specified for the field1 mapping, so verify custom converter was actually used
    assertNotNull("dest field1 should not be null", dest.getField1Prime());
    StringTokenizer st = new StringTokenizer(dest.getField1Prime(), "-");
    assertEquals("dest field1 value should contain a hyphon", 2, st.countTokens());
    st.nextToken();
    String token2 = st.nextToken();
    assertEquals("dest field1 value should have been appended to by the cust converter",
        StringAppendCustomConverter.APPENDED_VALUE, token2);
View Full Code Here


    simple.setField1(String.valueOf(System.currentTimeMillis()));

    ArrayCustConverterObj src = newInstance(ArrayCustConverterObj.class);
    src.setField1(new SimpleObj[] { simple });

    ArrayCustConverterObjPrime dest = mapper.map(src, ArrayCustConverterObjPrime.class);

    // Custom converter specified for the field1 mapping, so verify custom converter was actually used
    assertNotNull("dest field1 should not be null", dest.getField1Prime());
    StringTokenizer st = new StringTokenizer(dest.getField1Prime(), "-");
    assertEquals("dest field1 value should contain a hyphon", 2, st.countTokens());
    st.nextToken();
    String token2 = st.nextToken();
    assertEquals("dest field1 value should have been appended to by the cust converter",
        StringAppendCustomConverter.APPENDED_VALUE, token2);
View Full Code Here

TOP

Related Classes of org.dozer.vo.ArrayCustConverterObjPrime

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.