Пример #1
0
        public async Task MsgByIdDataTestReply()
        {
            using var store   = GetDocumentStore();
            using var session = store.OpenAsyncSession();

            await session.StoreAsync(MsgData.GetSecond());

            await session.SaveChangesAsync();

            WaitForIndexing(store);

            var loader = new MsgById()
            {
                Session = session, Id = MsgData.SecondId
            };
            await loader.Execute();

            loader.Result.Should().NotBeNull();
            loader.Result.Id.Should().Be(MsgData.SecondId);
            Assert.That(loader.Result, Is.DeepEqualTo(MsgData.GetSecond()));
        }