public void WeatherLoop_SuccessfulCitySearch_DisplaysWeatherDetailsAndSavesCity() { // Assemble var cityName = "TestCity"; var stateName = "TestState"; var id = 1; var key = "ABC"; var searchCityDto = SearchCityBuilder.Build(cityName, stateName, id, key); var weatherDate = DateTime.Now; var weatherDescription = "Sunny and cloudy and rainy and dry"; var tempValue = "24"; var tempUnit = "C"; var weatherDto = CurrentWeatherBuilder.Build(weatherDescription, tempValue, tempUnit, weatherDate); _weatherClient.CitySearch(cityName).Returns(new List <SearchCityDto> { searchCityDto }); _consoleWrapper.ReadLine().Returns(cityName); _weatherClient.GetWeather(key).Returns(weatherDto); // Act _sut.WeatherLoop(); // Assert _cityDataAccess.Received(1).SaveCity(searchCityDto); _weatherClient.Received(1).GetWeather(key); _consoleWrapper.Received(1).WriteLine($"{weatherDto.LocalObservationDateTime.ToShortTimeString()} - {weatherDto.LocalObservationDateTime.ToShortDateString()}{Environment.NewLine}" + $"{weatherDto.WeatherText} {weatherDto.Temperature.Metric.Value}{weatherDto.Temperature.Metric.Unit}{Environment.NewLine}"); }