Package com.saasovation.common.domain.model

Examples of com.saasovation.common.domain.model.DomainEvent.occurredOn()


    private StoredEvent newStoredEvent(long domainEventId, long storedEventId) {
        EventSerializer serializer = EventSerializer.instance();

        DomainEvent event = new TestableDomainEvent(domainEventId, "name" + domainEventId);
        String serializedEvent = serializer.serialize(event);
        StoredEvent storedEvent = new StoredEvent(event.getClass().getName(), event.occurredOn(), serializedEvent);
        storedEvent.setEventId(storedEventId);

        return storedEvent;
    }
}
View Full Code Here


        NotificationReader reader = new NotificationReader(serializedNotification);

        assertEquals(1L, reader.notificationId());
        assertEquals("1", reader.notificationIdAsString());
        assertEquals(domainEvent.occurredOn(), reader.occurredOn());
        assertEquals(notification.typeName(), reader.typeName());
        assertEquals(notification.version(), reader.version());
        assertEquals(domainEvent.eventVersion(), reader.version());
    }
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.