Package ma.glasnost.orika.test.crossfeatures.PolicyElementsTestCaseClasses

Examples of ma.glasnost.orika.test.crossfeatures.PolicyElementsTestCaseClasses.Policy


    @Test
    public void test() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        configureMapperFactory(factory);
       
        Policy policy = new Policy();
        Set<PolicyElement> elements = new HashSet<PolicyElement>();
        elements.add(new CustomerElement());
        elements.add(new ProductElement());
        elements.add(new OtherElement());
        elements.add(new OneOtherElement());
       
        policy.setElements(elements);
       
        PolicyDTO dto = factory.getMapperFacade().map(policy, PolicyDTO.class);
       
        Assert.assertEquals(elements.size(), dto.getElements().size());
    }
View Full Code Here


            }
           
        }).build();
        configureMapperFactory(factory);
       
        Policy policy = new Policy();
        Set<PolicyElement> elements = new HashSet<PolicyElement>();
        CustomerElement target = new CustomerElement();
        target.setName("Adil");
        elements.add(new PolicyElementProxy(target));
        elements.add(new ProductElement());
        elements.add(new OtherElement());
        elements.add(new OneOtherElement());
       
        policy.setElements(elements);
       
        PolicyDTO dto = factory.getMapperFacade().map(policy, PolicyDTO.class);
       
        Assert.assertEquals(elements.size(), dto.getElements().size());
       
View Full Code Here

    @Test
    public void test() {
        MapperFactory factory = MappingUtil.getMapperFactory();
        configureMapperFactory(factory);
       
        Policy policy = new Policy();
        Set<PolicyElement> elements = new HashSet<PolicyElement>();
        elements.add(new CustomerElement());
        elements.add(new ProductElement());
        elements.add(new OtherElement());
        elements.add(new OneOtherElement());
       
        policy.setElements(elements);
       
        PolicyDTO dto = factory.getMapperFacade(Policy.class, PolicyDTO.class).map(policy);
       
        Assert.assertEquals(elements.size(), dto.getElements().size());
    }
View Full Code Here

            }
           
        }).build();
        configureMapperFactory(factory);
       
        Policy policy = new Policy();
        Set<PolicyElement> elements = new HashSet<PolicyElement>();
        CustomerElement target = new CustomerElement();
        target.setName("Adil");
        elements.add(new PolicyElementProxy(target));
        elements.add(new ProductElement());
        elements.add(new OtherElement());
        elements.add(new OneOtherElement());
       
        policy.setElements(elements);
       
        PolicyDTO dto = factory.getMapperFacade(Policy.class, PolicyDTO.class).map(policy);
       
        Assert.assertEquals(elements.size(), dto.getElements().size());
       
View Full Code Here

TOP

Related Classes of ma.glasnost.orika.test.crossfeatures.PolicyElementsTestCaseClasses.Policy

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.