public void PressureToChartShouldReturnList(int density) { List <WeatherMain> expecWeatherMain = new List <WeatherMain>(); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 0, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 3, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 0, TemperatureMin = 0, TemperatureMax = 0, }); expecWeatherMain.Add(new WeatherMain() { Humidity = 0, Pressure = 4, Temperature = 0, 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.PressureToChart(expectedEntity, density); //Assert Assert.Equal(result.Count, expecWeatherMain.Count / density); }