Package com.saasovation.common.event

Examples of com.saasovation.common.event.TestableDomainEvent.occurredOn()


        TestableDomainEvent reconstitutedDomainEvent = storedEvent.toDomainEvent();

        assertNotNull(reconstitutedDomainEvent);
        assertEquals(domainEvent.id(), reconstitutedDomainEvent.id());
        assertEquals(domainEvent.name(), reconstitutedDomainEvent.name());
        assertEquals(domainEvent.occurredOn(), reconstitutedDomainEvent.occurredOn());
    }

    public void testCountStoredEvents() throws Exception {
        EventStore eventStore = this.eventStore();
View Full Code Here


        TestableDomainEvent reconstitutedDomainEvent = storedEvent.toDomainEvent();

        assertNotNull(reconstitutedDomainEvent);
        assertEquals(lastDomainEvent.id(), reconstitutedDomainEvent.id());
        assertEquals(lastDomainEvent.name(), reconstitutedDomainEvent.name());
        assertEquals(lastDomainEvent.occurredOn(), reconstitutedDomainEvent.occurredOn());
    }

    public void testStoredEvent() throws Exception {
        EventStore eventStore = this.eventStore();
View Full Code Here

        TestableDomainEvent reconstitutedDomainEvent = storedEvent.toDomainEvent();

        assertNotNull(reconstitutedDomainEvent);
        assertEquals(domainEvent.id(), reconstitutedDomainEvent.id());
        assertEquals(domainEvent.name(), reconstitutedDomainEvent.name());
        assertEquals(domainEvent.occurredOn(), reconstitutedDomainEvent.occurredOn());
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
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

        assertEquals("" + domainEvent.eventVersion(), reader.eventStringValue("/eventVersion"));
        assertEquals("" + domainEvent.id(), reader.eventStringValue("id"));
        assertEquals("" + domainEvent.id(), reader.eventStringValue("/id"));
        assertEquals("" + domainEvent.name(), reader.eventStringValue("name"));
        assertEquals("" + domainEvent.name(), reader.eventStringValue("/name"));
        assertEquals("" + domainEvent.occurredOn().getTime(), reader.eventStringValue("occurredOn"));
        assertEquals("" + domainEvent.occurredOn().getTime(), reader.eventStringValue("/occurredOn"));
    }

    public void testReadNestedDomainEventProperties() throws Exception {
        TestableNavigableDomainEvent domainEvent = new TestableNavigableDomainEvent(100, "testing");
View Full Code Here

        assertEquals("" + domainEvent.id(), reader.eventStringValue("id"));
        assertEquals("" + domainEvent.id(), reader.eventStringValue("/id"));
        assertEquals("" + domainEvent.name(), reader.eventStringValue("name"));
        assertEquals("" + domainEvent.name(), reader.eventStringValue("/name"));
        assertEquals("" + domainEvent.occurredOn().getTime(), reader.eventStringValue("occurredOn"));
        assertEquals("" + domainEvent.occurredOn().getTime(), reader.eventStringValue("/occurredOn"));
    }

    public void testReadNestedDomainEventProperties() throws Exception {
        TestableNavigableDomainEvent domainEvent = new TestableNavigableDomainEvent(100, "testing");
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.