public void NoCampgroundsAtParkTest() { // Arrange CampgroundDAL cDAL = new CampgroundDAL(connectionString); //Act IList <CampGround> cGround = cDAL.DisplayCampGrounds(2); //Assert int grounds = cGround.Count; Assert.AreEqual(0, grounds); }
private void GetCampGrounds() { CampgroundDAL dal = new CampgroundDAL(DatabaseConnection); IList <CampGround> camps = dal.DisplayCampGrounds(tempParkId); Console.WriteLine(); Console.WriteLine("Campgrounds in this park:"); Console.WriteLine(); Console.WriteLine(("Id").PadRight(15) + ("Name").PadRight(30) + ("Open").PadRight(15) + ("Close").PadRight(15) + ("Daily Fee").PadRight(5)); if (camps.Count > 0) { foreach (CampGround camp in camps) { Console.WriteLine("#" + (camp.CampgroundId.ToString()).PadRight(15) + (camp.Name.ToString()).PadRight(30) + (CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(camp.OpenFromMonth)).PadRight(15) + (CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(camp.CloseFromMonth)).PadRight(15) + "$" + (camp.DailyFee.ToString()).PadRight(15)); } } else { Console.WriteLine("**** NO RESULTS ****"); } }