public TestServerBuilder <T> AddTestService <TService>(Action <IServiceCollection> action) { Action <IServiceCollection> wrapper = serviceCollecton => { action.Invoke(serviceCollecton); }; TestServices.Add(action); return(this); }
public WebApplicationFactoryBuilder <T> AddTestService <TService>(Action <IServiceCollection> action) { // automatically remove existing services that are not automatically removed like typed HttpClients Action <IServiceCollection> wrapper = serviceCollecton => { //serviceCollecton.Remove<TService>(); action.Invoke(serviceCollecton); }; TestServices.Add(action); return(this); }