Beispiel #1
0
        protected async Task Given_An_Id_For_A_Stream_That_Does_Not_Exist_When_StreamExists_Is_Called_Then_False_Is_Returned(IEventStoreProvider eventStoreProvider)
        {
            // Arrange
            string eventStreamId = Guid.NewGuid().ToEventStreamIdFormattedString();

            // Act
            bool streamExists = await eventStoreProvider.StreamExistsAsync(eventStreamId).ConfigureAwait(false);

            // Assert
            Assert.False(streamExists);
        }
Beispiel #2
0
        protected async Task Given_An_Id_For_A_Stream_That_Does_Exist_When_StreamExists_Is_Called_Then_True_Is_Returned(IEventStoreProvider eventStoreProvider)
        {
            // Arrange
            string eventStreamId      = Guid.NewGuid().ToEventStreamIdFormattedString();
            object eventStoreMessage1 = new object();

            // Act
            eventStoreProvider.AppendEvents(eventStreamId, eventStoreMessage1);
            await eventStoreProvider.CommitEventsAsync(eventStreamId, ExpectedStreamRevision.New).ConfigureAwait(false);

            bool streamExists = await eventStoreProvider.StreamExistsAsync(eventStreamId).ConfigureAwait(false);

            // Assert
            Assert.True(streamExists);
        }