public WeatherForecastApplicationServiceTests() { //todo: try move following lines to TestBase.cs Mapper.Initialize(cfg => { cfg.AddProfile <ApplicationMappingProfile>(); }); var weatherForecastRepository = Substitute.For <IRepository <WeatherForecast> >(); weatherForecastRepository.GetAllAsync() .Returns(GetInitializedDbContext().WeatherForecasts.ToListAsync()); _weatherForecastApplicationService = new WeatherForecastApplicationService(weatherForecastRepository); }
public ValuesController(IWeatherForecastApplicationService weatherForecastApplicationService) { _weatherForecastApplicationService = weatherForecastApplicationService; }
public SampleDataController(IWeatherForecastApplicationService weatherForecastApplicationService) { _weatherForecastApplicationService = weatherForecastApplicationService; }