Search in sources :

Example 1 with Customer

use of org.apache.camel.converter.dozer.service.Customer 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);
}
Also used : Mapper(org.dozer.Mapper) DozerTestArtifactsFactory.createMapper(org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createMapper) DozerTestArtifactsFactory.createServiceCustomer(org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer) Customer(org.apache.camel.converter.dozer.service.Customer) Test(org.junit.Test)

Aggregations

DozerTestArtifactsFactory.createMapper (org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createMapper)1 DozerTestArtifactsFactory.createServiceCustomer (org.apache.camel.converter.dozer.DozerTestArtifactsFactory.createServiceCustomer)1 Customer (org.apache.camel.converter.dozer.service.Customer)1 Mapper (org.dozer.Mapper)1 Test (org.junit.Test)1