Search in sources :

Example 6 with EventStore

use of io.spine.server.event.EventStore in project core-java by SpineEventEngine.

the class EmptyEventStoreTest method notAppendAll.

@Test
@DisplayName("do nothing on `appendAll(Iterable<Event>)`")
void notAppendAll() {
    EventStore store = new EmptyEventStore();
    store.appendAll(ImmutableList.of(Event.getDefaultInstance()));
    assertEmpty(store);
}
Also used : EventStore(io.spine.server.event.EventStore) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Example 7 with EventStore

use of io.spine.server.event.EventStore in project core-java by SpineEventEngine.

the class EmptyEventStoreTest method beOpen.

@Test
@DisplayName("be open and close")
void beOpen() throws Exception {
    EventStore eventStore = new EmptyEventStore();
    assertTrue(eventStore.isOpen());
    eventStore.close();
    assertFalse(eventStore.isOpen());
}
Also used : EventStore(io.spine.server.event.EventStore) Test(org.junit.jupiter.api.Test) DisplayName(org.junit.jupiter.api.DisplayName)

Aggregations

EventStore (io.spine.server.event.EventStore)7 DisplayName (org.junit.jupiter.api.DisplayName)3 Test (org.junit.jupiter.api.Test)3 Event (io.spine.base.Event)2 BoundedContext (io.spine.server.BoundedContext)2 Test (org.junit.Test)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 Duration (com.google.protobuf.Duration)1 Message (com.google.protobuf.Message)1 Timestamp (com.google.protobuf.Timestamp)1 EventStreamQuery (io.spine.server.event.EventStreamQuery)1 AllTenantOperation (io.spine.server.tenant.AllTenantOperation)1 TestEventFactory (io.spine.test.TestEventFactory)1 ProjectId (io.spine.test.projection.ProjectId)1 ProjectCreated (io.spine.test.projection.event.ProjectCreated)1 ProjectStarted (io.spine.test.projection.event.ProjectStarted)1 TaskAdded (io.spine.test.projection.event.TaskAdded)1 MultiTenant.newBoundedContext (io.spine.testdata.TestBoundedContextFactory.MultiTenant.newBoundedContext)1 Set (java.util.Set)1