public void Testa_GetAll_Valida_Tipo() { _weather = new WeatherService(); List <WeatherForecast> result = new List <WeatherForecast>(); result.AddRange(_weather.GetAll()); Assert.IsType <WeatherForecast>(result[0]); }
public void Testa_GetAll_Valida_Quantidade() { _weather = new WeatherService(); List <WeatherForecast> result = new List <WeatherForecast>(); result.AddRange(_weather.GetAll()); Assert.True(result.Count == Summaries.Length); }
public void Testa_GetAll_Valida_Retorno() { _weather = new WeatherService(); WeatherForecast model = new WeatherForecast(); List <WeatherForecast> result = new List <WeatherForecast>(); result.AddRange(_weather.GetAll()); model = result[0]; Assert.Contains(model, result); }
public async Task <ActionResult <OpenWeatherForecastModel> > GetByZipCode(string zipCode, [FromServices] IWeatherServices wsvc) => await wsvc.GetWeatherResults(zipCode, false);
public async Task <ActionResult <OpenWeatherForecastModel> > GetByCityName(string cityName, [FromServices] IWeatherServices wsvc) => await wsvc.GetWeatherResults(cityName, true);
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherServices weatherServices) { _logger = logger; _weatherServices = weatherServices; }
public WeatherTilesController(IWeatherServices weatherServices) { _weatherService = weatherServices ?? throw new ArgumentNullException(nameof(weatherServices)); }
public OpenWeatherController(IWeatherServices weatherServices, IHostingEnvironment hostingenv) { _weatherServices = weatherServices; _hostingenv = hostingenv; }
public WeatherPluginHandler(ILogger <WeatherPluginHandler> logger, IWeatherServices weatherServices) { _logger = logger; _weatherServices = weatherServices; }
public WeatherController() { _weatherServices = ServicesFactory.GetWeatherServices(); }
public WeatherController(IWeatherServices weatherServices) { _weatherServices = weatherServices; }
public WeatherForecastController(ILogger <WeatherForecastController> logger, IWeatherServices openWeatherServices, ISpotifyServices spotifyServices) { _logger = logger; _openWeatherServices = openWeatherServices; _spotifyServices = spotifyServices; }