protected override void SetMenuOptions()
        {
            IList <Campground> campList = campObj.GetAllCampgrounds(park.ParkId);
            int i = 1;

            foreach (Campground camp in campList)
            {
                menuOptions.Add(i.ToString(), $"{camp.Name,-40} {camp.OpenFrom,-10} {camp.OpenTo,-10} {camp.DailyFee,-10:C}");
                i++;
            }
            this.menuOptions.Add("0", "Return to Previous Screen");
            this.quitKey = "0";
        }
        public void GetAllCampground_ReturnsNumberOfCampgrounds()
        {
            CampgroundSqlDAO   dao         = new CampgroundSqlDAO(ConnectionString);
            IList <Campground> campgrounds = dao.GetAllCampgrounds(NewParkId);

            Assert.AreEqual(1, campgrounds.Count);
        }
        public void GetAllCampgrounds_ShouldReturn1()
        {
            //Arrange
            CampgroundSqlDAO dao = new CampgroundSqlDAO(ConnectionString);
            //Act
            IList <Campground> output = dao.GetAllCampgrounds(this.ParkId);

            //Assert
            Assert.AreEqual(1, output.Count);
        }
        public void GetAllCampgroundsTest()
        {
            // Arrange
            IList <Campground> cgrounds;
            ICampgroundDAO     dao = new CampgroundSqlDAO(connection);

            // Act
            cgrounds = dao.GetAllCampgrounds();

            // Assert
            Assert.AreEqual(7, cgrounds.Count);
        }
        public void GetAllCampgroundsInParkTest()
        {
            // Arrange
            IList <Campground> cgrounds;
            Park p = new Park()
            {
                ParkID = 1
            };
            ICampgroundDAO dao = new CampgroundSqlDAO(connection);

            // Act
            cgrounds = dao.GetAllCampgrounds(p);

            // Assert
            Assert.AreEqual(3, cgrounds.Count);
        }
        public void TestGetAllCampgrounds()
        {
            //Arrange
            CampgroundSqlDAO dao = new CampgroundSqlDAO(connectionString);

            //Act
            IList <Campground> campgrounds = dao.GetAllCampgrounds();
            int i = 0;

            for (; i < campgrounds.Count; i++)
            {
                if (campgrounds[i].CampgroundId == newCampgroundId)
                {
                    break;
                }
            }

            //Assert
            Assert.AreEqual(2, campgrounds.Count);
            Assert.AreEqual("Big Trees", campgrounds[i].Name);
        }