Examples of AnnotatedExtendedDataTransferObjectImpl


Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dtoVal1");
        dto.setValue2("dtoVal2");
        dto.setTimestamp(time);

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityBeforeExact(dto, entity);

        assertEquals(entity.getValue(), "dtoVal1");
        assertEquals(entity.getValue2(), "dtoVal2");
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dtoVal1");
        assertEquals(dto.getValue2(), "dtoVal2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dtoVal1");
        dto.setValue2("dtoVal2");
        dto.setTimestamp(time);

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityBefore(dto, entity, new Object());

        assertEquals(entity.getValue(), "dtoVal1");
        assertEquals(entity.getValue2(), "dtoVal2");
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dtoVal1");
        assertEquals(dto.getValue2(), "dtoVal2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dtoVal1");
        dto.setValue2("dtoVal2");
        dto.setTimestamp(time);

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityByFilterBeforeExact(dto, entity);

        assertEquals(entity.getValue(), "dtoVal1");
        assertNull(entity.getValue2());
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dtoVal1");
        assertEquals(dto.getValue2(), "dtoVal2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dtoVal1");
        dto.setValue2("dtoVal2");
        dto.setTimestamp(time);

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityByFilterBefore(dto, entity, new Object());

        assertEquals(entity.getValue(), "dtoVal1");
        assertNull(entity.getValue2());
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dtoVal1");
        assertEquals(dto.getValue2(), "dtoVal2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto1 = new AnnotatedExtendedDataTransferObjectImpl();
        dto1.setValue("dto1Val1");
        dto1.setValue2("dto1Val2");
        dto1.setTimestamp(time);
        final ExtendedDataTransferObject dto2 = new AnnotatedExtendedDataTransferObjectImpl();
        dto2.setValue("dto2Val1");
        dto2.setValue2("dto2Val2");
        dto2.setTimestamp(time);

        final List<ExtendedDataTransferObject> dtos = Arrays.asList(dto1, dto2);
        final List<DomainObject> entities = new ArrayList<DomainObject>();

        service.dtosToEntitiesBeforeExact(dtos, entities);

        assertEquals(entities.size(), 2);       
        final DomainObject entity1 = entities.get(0);
        assertEquals(entity1.getValue(), "dto1Val1");
        assertEquals(entity1.getValue2(), "dto1Val2");
        assertNull(entity1.getTimestamp());
        final DomainObject entity2 = entities.get(1);
        assertEquals(entity2.getValue(), "dto2Val1");
        assertEquals(entity2.getValue2(), "dto2Val2");
        assertNull(entity2.getTimestamp());

        assertEquals(dto1.getValue(), "dto1Val1");
        assertEquals(dto1.getValue2(), "dto1Val2");
        assertEquals(dto1.getTimestamp(), time);

        assertEquals(dto2.getValue(), "dto2Val1");
        assertEquals(dto2.getValue2(), "dto2Val2");
        assertEquals(dto2.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 2, 2, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto1 = new AnnotatedExtendedDataTransferObjectImpl();
        dto1.setValue("dto1Val1");
        dto1.setValue2("dto1Val2");
        dto1.setTimestamp(time);
        final ExtendedDataTransferObject dto2 = new AnnotatedExtendedDataTransferObjectImpl();
        dto2.setValue("dto2Val1");
        dto2.setValue2("dto2Val2");
        dto2.setTimestamp(time);

        final List<ExtendedDataTransferObject> dtos = Arrays.asList(dto1, dto2);
        final List<DomainObject> entities = new ArrayList<DomainObject>();

        service.dtosToEntitiesBefore(dtos, entities, new Object());

        assertEquals(entities.size(), 2);
        final DomainObject entity1 = entities.get(0);
        assertEquals(entity1.getValue(), "dto1Val1");
        assertEquals(entity1.getValue2(), "dto1Val2");
        assertNull(entity1.getTimestamp());
        final DomainObject entity2 = entities.get(1);
        assertEquals(entity2.getValue(), "dto2Val1");
        assertEquals(entity2.getValue2(), "dto2Val2");
        assertNull(entity2.getTimestamp());

        assertEquals(dto1.getValue(), "dto1Val1");
        assertEquals(dto1.getValue2(), "dto1Val2");
        assertEquals(dto1.getTimestamp(), time);

        assertEquals(dto2.getValue(), "dto2Val1");
        assertEquals(dto2.getValue2(), "dto2Val2");
        assertEquals(dto2.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 2, 2, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto1 = new AnnotatedExtendedDataTransferObjectImpl();
        dto1.setValue("dto1Val1");
        dto1.setValue2("dto1Val2");
        dto1.setTimestamp(time);
        final ExtendedDataTransferObject dto2 = new AnnotatedExtendedDataTransferObjectImpl();
        dto2.setValue("dto2Val1");
        dto2.setValue2("dto2Val2");
        dto2.setTimestamp(time);

        final List<ExtendedDataTransferObject> dtos = Arrays.asList(dto1, dto2);
        final List<DomainObject> entities = new ArrayList<DomainObject>();

        service.dtosToEntitiesByFilterBeforeExact(dtos, entities);

        assertEquals(entities.size(), 2);
        final DomainObject entity1 = entities.get(0);
        assertEquals(entity1.getValue(), "dto1Val1");
        assertNull(entity1.getValue2());
        assertNull(entity1.getTimestamp());
        final DomainObject entity2 = entities.get(1);
        assertEquals(entity2.getValue(), "dto2Val1");
        assertNull(entity2.getValue2());
        assertNull(entity2.getTimestamp());

        assertEquals(dto1.getValue(), "dto1Val1");
        assertEquals(dto1.getValue2(), "dto1Val2");
        assertEquals(dto1.getTimestamp(), time);

        assertEquals(dto2.getValue(), "dto2Val1");
        assertEquals(dto2.getValue2(), "dto2Val2");
        assertEquals(dto2.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 2, 2, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto1 = new AnnotatedExtendedDataTransferObjectImpl();
        dto1.setValue("dto1Val1");
        dto1.setValue2("dto1Val2");
        dto1.setTimestamp(time);
        final ExtendedDataTransferObject dto2 = new AnnotatedExtendedDataTransferObjectImpl();
        dto2.setValue("dto2Val1");
        dto2.setValue2("dto2Val2");
        dto2.setTimestamp(time);

        final List<ExtendedDataTransferObject> dtos = Arrays.asList(dto1, dto2);
        final List<DomainObject> entities = new ArrayList<DomainObject>();

        service.dtosToEntitiesByFilterBefore(dtos, entities, new Object());

        assertEquals(entities.size(), 2);
        final DomainObject entity1 = entities.get(0);
        assertEquals(entity1.getValue(), "dto1Val1");
        assertNull(entity1.getValue2());
        assertNull(entity1.getTimestamp());
        final DomainObject entity2 = entities.get(1);
        assertEquals(entity2.getValue(), "dto2Val1");
        assertNull(entity2.getValue2());
        assertNull(entity2.getTimestamp());

        assertEquals(dto1.getValue(), "dto1Val1");
        assertEquals(dto1.getValue2(), "dto1Val2");
        assertEquals(dto1.getTimestamp(), time);

        assertEquals(dto2.getValue(), "dto2Val1");
        assertEquals(dto2.getValue2(), "dto2Val2");
        assertEquals(dto2.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 2, 2, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dto1Val1");
        dto.setValue2("dto1Val2");
        dto.setTimestamp(time);

        final DomainObject entity = (DomainObject) service.dtoToEntityKeyAfterExact(dto);

        assertEquals(entity.getValue(), "dto1Val1");
        assertEquals(entity.getValue2(), "dto1Val2");
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dto1Val1");
        assertEquals(dto.getValue2(), "dto1Val2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here

Examples of com.inspiresoftware.lib.dto.geda.test.impl.AnnotatedExtendedDataTransferObjectImpl

                this.applicationContext.getBean("annSimpleTransferableService", TestService.class);

        assertCountersAreZero();

        final Date time = new Date();
        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();
        dto.setValue("dto1Val1");
        dto.setValue2("dto1Val2");
        dto.setTimestamp(time);

        final DomainObject entity = (DomainObject) service.dtoToEntityKeyAfter(dto, new Object());

        assertEquals(entity.getValue(), "dto1Val1");
        assertEquals(entity.getValue2(), "dto1Val2");
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dto1Val1");
        assertEquals(dto.getValue2(), "dto1Val2");
        assertEquals(dto.getTimestamp(), time);

        // final check counters
        assertCounters(0, 0, 0, 1, 1, 0);

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.