Пример #1
0
        //[Fact] -- unreliable. May not actually be useful.
        public async Task using_ExecuteAndWait()
        {
            await theHost.ExecuteAndWait(
                () => theHost.Messaging.Invoke(new CreateUser {
                Name = "Tom"
            }));


            using (var session = theHost.Get <IDocumentStore>().QuerySession())
            {
                session.Load <User>("Tom").ShouldNotBeNull();
            }

            theHost.Get <UserNames>()
            .Names.Single().ShouldBe("Tom");
        }