public void TemperaturesToChartsShouldReturnList(int density) { List <WeatherMain> expecWeatherMain = new List <WeatherMain>(); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 0, Temperature = 7, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 3, Temperature = 8, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 4, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 3, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 77, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 9, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 23, TemperatureMin = 0, TemperatureMax = 0, }); List <ForecastEntity> expectedEntity = new List <ForecastEntity>(); foreach (var weatherMain in expecWeatherMain) { expectedEntity.Add(new ForecastEntity() { WeatherMain = weatherMain }); } ModelsService models = new ModelsService(); //Act ChartValues <double> result = models.TemperaturesToChart(expectedEntity, density); //Assert Assert.Equal(result.Count, expecWeatherMain.Count / density); }