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();

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

        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

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

        final DomainObject res = (DomainObject) service.entityToDtoAndBackToEntityExact(dto, entity);

        assertEquals(entity.getValue(), "entityVal1");
        assertEquals(entity.getValue2(), "entityVal2");
        assertEquals(entity.getTimestamp(), time);

        assertNotSame(res, entity);

        assertEquals(dto.getValue(), "entityVal2");
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertEquals(res.getValue(), "entityVal2");
        assertEquals(res.getValue2(), "entityVal1");
        assertNull(res.getTimestamp());
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

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

        assertEquals(entity.getValue(), "entityVal1");
        assertEquals(entity.getValue2(), "entityVal2");
        assertEquals(entity.getTimestamp(), time);

        assertNotSame(res, entity);

        assertEquals(dto.getValue(), "entityVal2");
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertEquals(res.getValue(), "entityVal2");
        assertEquals(res.getValue2(), "entityVal1");
        assertNull(res.getTimestamp());
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

        final DomainObject res = (DomainObject) service.entityToDtoAndBackToEntityByFilterExact(dto, entity);

        assertEquals(entity.getValue(), "entityVal1");
        assertEquals(entity.getValue2(), "entityVal2");
        assertEquals(entity.getTimestamp(), time);

        assertNotSame(res, entity);

        assertNull(dto.getValue());
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertNull(res.getValue());
        assertNull(res.getValue2());
        assertNull(res.getTimestamp());
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

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

        assertEquals(entity.getValue(), "entityVal1");
        assertEquals(entity.getValue2(), "entityVal2");
        assertEquals(entity.getTimestamp(), time);

        assertNotSame(res, entity);

        assertNull(dto.getValue());
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertNull(res.getValue());
        assertNull(res.getValue2());
        assertNull(res.getTimestamp());
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

        service.entityToDtoAndBackToEntityVoidExact(dto, entity);

        assertEquals(dto.getValue(), "entityVal2");
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertEquals(entity.getValue(), "entityVal2");
        assertEquals(entity.getValue2(), "entityVal1");
        assertEquals(entity.getTimestamp(), time);


        // final check counters
        assertCounters(1, 1, 0, 1, 1, 0);
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

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

        assertEquals(dto.getValue(), "entityVal2");
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

        assertEquals(entity.getValue(), "entityVal2");
        assertEquals(entity.getValue2(), "entityVal1");
        assertEquals(entity.getTimestamp(), time);


        // final check counters
        assertCounters(1, 1, 0, 1, 1, 0);
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

        service.entityToDtoAndBackToEntityVoidByFilterExact(dto, entity);

        assertNull(dto.getValue());
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

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


        // final check counters
        assertCounters(1, 1, 0, 1, 1, 0);
View Full Code Here

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

        assertCountersAreZero();

        final Date time = new Date();

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

        final ExtendedDataTransferObject dto = new AnnotatedExtendedDataTransferObjectImpl();

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

        assertNull(dto.getValue());
        assertEquals(dto.getValue2(), "entityVal1");
        assertNotNull(dto.getTimestamp());
        assertTrue(dto.getTimestamp().after(entity.getTimestamp()));

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


        // 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.