/// <summary> /// Populates list of parks for SurveyViewModel park selection dropdown. /// </summary> /// <param name="survey"></param> private void populateParksList(SurveyViewModel survey) { var parkList = _db.GetParks(); foreach (Park park in parkList) { survey.Parks.Add(new SelectListItem() { Text = park.ParkName, Value = park.Code }); } }
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); }