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(); }
public void CleanUp() { InMemoryShippingSlipService.CleanUp(); InMemoryCustomerAccountService.CleanUp(); }