Пример #1
0
        public ApiFacade()
        {
            InMemoryShippingSlipService    = new InMemoryShippingSlipService();
            InMemoryCustomerAccountService = new InMemoryCustomerAccountService();

            var appFactory = WithWebHostBuilder(config =>
            {
                config
                .ConfigureTestServices(services =>
                {
                    services.AddTransient <IShippingSlipService>(s => InMemoryShippingSlipService);
                    services.AddTransient <ICustomerAccountService>(s => InMemoryCustomerAccountService);
                });
            });

            HttpClient = appFactory.CreateClient();
        }
Пример #2
0
 public void CleanUp()
 {
     InMemoryShippingSlipService.CleanUp();
     InMemoryCustomerAccountService.CleanUp();
 }