public void NumWeatherTest() { _db = new ParkGeekDAO("Data Source=localhost\\sqlexpress;Initial Catalog=NPGeekTest;Integrated Security=True"); var numWeather = _db.GetFiveDayWeather("CVNP"); Assert.AreEqual(5, numWeather.Count); }
public IActionResult Detail(string parkCode) { ParkViewModel vm = new ParkViewModel(); vm.Park = _db.GetPark(parkCode); vm.FiveDayForeCast = _db.GetFiveDayWeather(parkCode); return(GetAuthenticatedView("Detail", vm)); }
public void GetWeatherTest() { _db = new ParkGeekDAO("Data Source=localhost\\sqlexpress;Initial Catalog=NPGeekTest;Integrated Security=True"); var weather = _db.GetFiveDayWeather("CVNP"); Assert.AreEqual(38, weather[0].LowTemp); Assert.AreEqual(62, weather[0].HighTemp); Assert.AreEqual("rain", weather[0].Forecast); }