// GET: Campground public ActionResult Index(int id) { CampgroundSqlDAL campgroundDAL = new CampgroundSqlDAL(connectionString); List <Campground> campgroundList = campgroundDAL.ListCampgrounds(id); return(View("Index", campgroundList)); }
public void GetParksTest() { //Arrange CampgroundSqlDAL campgroundSqlDal = new CampgroundSqlDAL(connectionString); //Act List <Campground> campground = campgroundSqlDal.ListCampgrounds(1); //Assert Assert.IsNotNull(campground); Assert.AreEqual(numberOfCampgrounds, campground.Count); }