public StationFinderServiceTest(ITestOutputHelper output) { this.output = output; var services = new ServiceCollection() .AddLogging((builder) => builder.AddXUnit(output)); services.AddSingleton <IStationFinderService, StationFinderService>(); var provider = services.BuildServiceProvider(); _logger = provider.GetService <ILogger <StationFinderServiceTest> >(); _stationFinderService = provider.GetService <IStationFinderService>(); }
public StationsController(IStationFinderService stationFinderService, ILogger <StationsController> logger) { _logger = logger; _stationFinderService = stationFinderService; }