Esempio n. 1
0
        public void GetCampgroundInfo_Test()
        {
            CampgroundSqlDAL dal = new CampgroundSqlDAL(ConnectionString);

            Park testPark = new Park(1);

            dal.GetCampgroundInfo(testPark);

            Assert.AreEqual(1, testPark.Campgrounds.Count);
        }
Esempio n. 2
0
        public void GetCampgroundInfoTest()
        {
            //Arrange
            CampgroundSqlDAL campgroundSqlDAL = new CampgroundSqlDAL();

            //Act
            Campground campground = campgroundSqlDAL.GetCampgroundInfo("gramercy");

            //Assert
            Assert.AreEqual(30.0, campground.Daily_Fee);
        }
        /// <summary>
        /// Once a park is selected, goes to the data base and gets all the data
        /// for the park, its campgrounds and its sites.
        /// This data shouldn't change super frequently.
        /// </summary>
        /// <param name="park"></param>
        private void GetAllInfo(Park park)
        {
            ParkSqlDAL parkDAL = new ParkSqlDAL(DatabaseConnection);

            parkDAL.GetParkInfo(park);

            CampgroundSqlDAL campgroundDAL = new CampgroundSqlDAL(DatabaseConnection);

            campgroundDAL.GetCampgroundInfo(park);

            SiteSqlDAL siteDAL = new SiteSqlDAL(DatabaseConnection);

            siteDAL.GetSiteInfo(park);
        }