public void ViewCampgroundsTest()
        {
            // Arrange
            CampgroundSqlDAL campgroundDal = new CampgroundSqlDAL(connectionString);

            //Act
            List <Campground> campgrounds = campgroundDal.ViewCampgrounds(parkID); //<-- use our dummy park

            //Assert
            Assert.AreEqual(1, campgrounds.Count);                      // We should only have one campground in Alum Creek
            Assert.AreEqual(campgroundID, campgrounds[0].CampgroundId); // We created the campground ahead of time and know the id to check for
        }
Example #2
0
            public void ViewCampgroundsTest()
            {
                // Arrange
                CampgroundSqlDAL campgroundDal = new CampgroundSqlDAL(connectionString);

                //Act
                List <Campground> campgrounds = campgroundDal.ViewCampgrounds(50); //<-- use our dummy country

                //Assert
                Assert.AreEqual(1, campgrounds.Count);               // We should only have one city in ABC country
                Assert.AreEqual(50, campgrounds[0].CampgroundId);    // We created the city ahead of time and know the id to check for
            }
        // Uses a DAO to view a list of all campgrounds within a given park
        public void ViewCampgrounds(int parkNumber)
        {
            CampgroundSqlDAL  myDal = new CampgroundSqlDAL(databaseConnectionString);
            List <Campground> camps = myDal.ViewCampgrounds(parkNumber);

            Console.WriteLine("Camp ID            Name                                     Open Month        Close Month           Daily Fee");
            Console.WriteLine("------------------------------------------------------------------------------------------------------------------");
            foreach (Campground camp in camps)
            {
                Console.WriteLine(camp);
            }
            Console.WriteLine();
        }
Example #4
0
        public void ViewCampgrounds(int parkNumber)
        {
            CampgroundSqlDAL  myDal = new CampgroundSqlDAL(databaseConnectionString);
            List <Campground> camps = myDal.ViewCampgrounds(parkNumber);

            Console.WriteLine("Camp ID            Name          Open Date            Close Date           Daily Fee");
            foreach (Campground camp in camps)
            {
                Console.WriteLine(camp);
            }
            Console.WriteLine();

            //ReservationInterface(parkNumber);*/
        }