/// <summary> /// Populates ParkViewModel park details and weather forecast with one specific park obtained by Park ID. /// Uses two DAO methods. One to obtain specific park details, the other to obtain five day weather forecast of that park. /// </summary> /// <param name="id"></param> /// <returns></returns> private ParkViewModel PopulateParkDetails(string id) { var park = _db.GetParkById(id); var forecast = _db.GetWeatherById(id); ParkViewModel vm = new ParkViewModel(); populatePark(vm, park[0]); SetDegreeSymbol(forecast, vm); return(vm); }
public void TestParks() { var testResult = _db.GetParks(); Assert.AreEqual(11, testResult.Count, "Count does not match"); var tr = _db.GetParkById("AIK"); Assert.AreEqual("Hyped", tr[0].State); Assert.AreEqual(1969, tr[0].YearFounded); Assert.AreEqual(500, tr[0].MilesOfTrail); Assert.AreEqual(350, tr[0].EntryFee); }