Exemple #1
0
        public void ServiceFactoryGetItemWithCompletedActionVerifyWorks()
        {
            CustomerDto customer = null;

            var manualResetEvent = new ManualResetEvent(false);

            factoryHelper.ServiceFactory
            .Fill(x => x.GetMainCustomer())
            .Completed(
                x =>
            {
                customer = x;
                manualResetEvent.Set();
            });

            manualResetEvent.WaitOne();

            customer.Should().Be(Known.Customer.Main);

            factoryHelper.ItemLoaded.Should().BeTrue();
        }