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);
        }
Пример #2
0
 public ValuesController(IWeatherForecastApplicationService weatherForecastApplicationService)
 {
     _weatherForecastApplicationService = weatherForecastApplicationService;
 }
Пример #3
0
 public SampleDataController(IWeatherForecastApplicationService weatherForecastApplicationService)
 {
     _weatherForecastApplicationService = weatherForecastApplicationService;
 }