Examples of DomainObjectImpl


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

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

        final DomainObject entity = new DomainObjectImpl();

        final ExtendedDataTransferObject res = (ExtendedDataTransferObject) service.dtoToEntityAndBackToDtoByFilterExact(dto, entity);

        assertNotSame(res, dto);

        assertNull(entity.getValue());
        assertEquals(entity.getValue2(), "dtoVal1");
        assertNotNull(entity.getTimestamp());
        assertTrue(entity.getTimestamp().after(time));

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

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

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

    }
View Full Code Here

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

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

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityBeforeExact(dto, entity);

        assertNull(entity.getValue());
        assertNull(entity.getValue2());
        assertNull(entity.getTimestamp());

        assertEquals(dto.getValue(), "dtoVal1");
        assertEquals(dto.getValue2(), "dtoVal2");
        assertEquals(dto.getTimestamp(), time);
View Full Code Here

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

        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);
View Full Code Here

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

        final ExtendedDataTransferObject dto = new DSLExtendedDataTransferObjectImpl();
        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);
View Full Code Here

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

    public void testTransferCustomProperty() {

        final TestXmlService service =
                this.applicationContext.getBean("xmlTestServiceCustomProperty", TestXmlService.class);

        final DomainObject entity = new DomainObjectImpl();
        entity.setValue("entityVal1");
        entity.setValue2("entityVal2");

        final ExtendedDataTransferObject dto = service.transfer(entity);

        assertEquals(dto.getValue(), "entityVal1");
        assertEquals(dto.getValue2(), "entityVal2");
View Full Code Here

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

    public void testTransferDefaultProperty() {

        final TestXmlService service =
                this.applicationContext.getBean("xmlTestServiceDefaultProperty", TestXmlService.class);

        final DomainObject entity = new DomainObjectImpl();
        entity.setValue("entityVal1");
        entity.setValue2("entityVal2");

        final ExtendedDataTransferObject dto = service.transfer(entity);

        assertEquals(dto.getValue(), "entityVal1");
        assertEquals(dto.getValue2(), "entityVal2");
View Full Code Here

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

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

        final DomainObject entity = new DomainObjectImpl();

        final ExtendedDataTransferObject res = (ExtendedDataTransferObject) service.dtoToEntityAndBackToDtoByFilter(dto, entity, new Object());

        assertNotSame(res, dto);

        assertNull(entity.getValue());
        assertEquals(entity.getValue2(), "dtoVal1");
        assertNotNull(entity.getTimestamp());
        assertTrue(entity.getTimestamp().after(time));

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

        assertNull(res.getValue());
        assertNull(res.getValue2());
        assertEquals(res.getTimestamp(), entity.getTimestamp());

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

    }
View Full Code Here

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

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

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityAndBackToDtoVoidExact(dto, entity);

        assertEquals(entity.getValue(), "dtoVal2");
        assertEquals(entity.getValue2(), "dtoVal1");
        assertNotNull(entity.getTimestamp());
        assertTrue(entity.getTimestamp().after(time));

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

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

    }
View Full Code Here

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

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

        final DomainObject entity = new DomainObjectImpl();

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

        assertEquals(entity.getValue(), "dtoVal2");
        assertEquals(entity.getValue2(), "dtoVal1");
        assertNotNull(entity.getTimestamp());
        assertTrue(entity.getTimestamp().after(time));

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

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

    }
View Full Code Here

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

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

        final DomainObject entity = new DomainObjectImpl();

        service.dtoToEntityAndBackToDtoVoidByFilterExact(dto, entity);

        assertNull(entity.getValue());
        assertEquals(entity.getValue2(), "dtoVal1");
        assertNotNull(entity.getTimestamp());
        assertTrue(entity.getTimestamp().after(time));

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

        // final check counters
        assertCounters(1, 1, 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.