Package com.inspiresoftware.lib.dto.geda.benchmark

Examples of com.inspiresoftware.lib.dto.geda.benchmark.Mapper


    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new DozerBasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here


    public void testMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistory();

        final Mapper mapper = new DozerListMapper();

        final Person fromDto = (Person) mapper.fromDto(dto);
        assertEquals(entity, fromDto);
        assertNotNull(fromDto.getPreviousAddresses());
        assertEquals(2, fromDto.getPreviousAddresses().size());
        assertEquals(entity.getPreviousAddresses().get(0), fromDto.getPreviousAddresses().get(0));

        final PersonWithHistoryDTO fromEntity = (PersonWithHistoryDTO) mapper.fromEntity(entity);
        assertEquals(dto, fromEntity);
        assertNotNull(fromEntity.getPreviousAddresses());
        assertEquals(2, fromEntity.getPreviousAddresses().size());
        assertEquals(((PersonWithHistoryDTO) dto).getPreviousAddresses().get(0), fromEntity.getPreviousAddresses().get(0));
View Full Code Here

    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new ModelMapperBasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here

    public void testMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistory();

        final Mapper mapper = new ModelMapperListMapper();

        final Person fromDto = (Person) mapper.fromDto(dto);
        assertEquals(entity, fromDto);
        assertNotNull(fromDto.getPreviousAddresses());
        assertEquals(2, fromDto.getPreviousAddresses().size());
        assertEquals(entity.getPreviousAddresses().get(0), fromDto.getPreviousAddresses().get(0));

        final PersonWithHistoryDTO fromEntity = (PersonWithHistoryDTO) mapper.fromEntity(entity);
        assertEquals(dto, fromEntity);
        assertNotNull(fromEntity.getPreviousAddresses());
        assertEquals(2, fromEntity.getPreviousAddresses().size());
        assertEquals(((PersonWithHistoryDTO) dto).getPreviousAddresses().get(0), fromEntity.getPreviousAddresses().get(0));
View Full Code Here

    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new ManualBasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));


    }
View Full Code Here

    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new GeDABasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here

        for (int i = 0; i < PERFORMANCE_TEST_CYCLES; i++) {

            final PersonDTO dto = getDto();

            final Mapper mapper = new GeDABasicMapper();

            mapper.fromDto(dto);
            //testMapper();
        }
    }
View Full Code Here

    public void testCollectionsMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistory();

        final Mapper mapper = new GeDAListMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here

    public void testMapMapper() throws Exception {

        final Person entity = getEntityWithHistory();
        final PersonDTO dto = getDtoWithHistoryByCity();

        final Mapper mapper = new GeDABasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here

    public void testMapper() throws Exception {

        final Person entity = getEntity();
        final PersonDTO dto = getDto();

        final Mapper mapper = new OrikaBasicMapper();

        assertEquals(entity, mapper.fromDto(dto));
        assertEquals(dto, mapper.fromEntity(entity));

    }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.benchmark.Mapper

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.