Esempio n. 1
0
        public void When_There_Is_No_Message_In_The_Message_Store()
        {
            AsyncContext.Run(async() => s_messages = await s_eventStoreMessageStore.GetAsync(EmptyStreamName, 0, 1));

            //_returns_an_empty_list
            0.Should().Be(s_messages.Count);
        }
        public void When_Writing_Messages_To_The_Message_Store_Async()
        {
            AsyncContext.Run(async() => _messages = await _eventStoreMessageStore.GetAsync(StreamName, 0, 2));

            //_gets_message1
            Assert.AreEqual(_messages.Count(m => MessagesEqualApartFromTimestamp(m, _message1)), 1);
            //_gets_message2
            Assert.AreEqual(_messages.Count(m => MessagesEqualApartFromTimestamp(m, _message2)), 1);
        }