use of org.dozer.Mapper in project camel by apache.
the class DozerTypeConverterTest method verifyCustomerMapping.
@Test
public void verifyCustomerMapping() throws Exception {
Mapper mapper = DozerTestArtifactsFactory.createMapper();
Customer service = createServiceCustomer();
org.apache.camel.converter.dozer.model.Customer model = mapper.map(service, org.apache.camel.converter.dozer.model.Customer.class);
Customer roundTrip = mapper.map(model, Customer.class);
assertEquals(service, roundTrip);
}
use of org.dozer.Mapper in project useful-java-links by Vedenin.
the class DozerHelloWorldAnnotation method main.
public static void main(String[] args) {
// init mapper
Mapper mapper = new DozerBeanMapper();
// convert
Source source = new Source("Hello World!");
Destination destObject = mapper.map(source, Destination.class);
// print Hello World!
destObject.print();
}
Aggregations