public void GetParkByName_Test() { Park p = v.GetParkByName("Acadia", connectionString); Park a = v.GetParkByName("Arches", connectionString); Assert.AreEqual("Acadia", p.Name); Assert.AreEqual(76518, a.Area); }
public static void ParkInformationScreen(string parkName) { PrintTrees(); Console.WriteLine(); Park p = parkDAL.GetParkByName(parkName, connectionString); List <string> parkInfo = parkDAL.ViewParkInformation(parkName, connectionString); PrintMenuSingleSpaced(new[] { $"{parkInfo[0]} National Park", "", "Location:".PadRight(20) + $"{parkInfo[1]}", $"Established:".PadRight(20) + $"{parkInfo[2].Substring(0, 10)}", $"Area:".PadRight(20) + $"{parkInfo[3]}", $"Annual Visitors:".PadRight(20) + $"{parkInfo[4]}" }); Console.WriteLine(); string[] result = SpliceText(parkInfo[5], 100); PrintMenuSingleSpaced(result); Console.WriteLine(); PrintMenuSingleSpaced(new[] { "1) View Campgrounds", "2) Verify Existing Reservation" , "3) Book Reservation By Park", "4) Return to Park Selection Menu" }); PrintTreesBottom(); string input = CLIHelper.GetString("Select a Command"); if (input == "1") { Console.Clear(); ParkCampgroundScreen(p); } if (input == "2") { Console.Clear(); SearchForReservationByID(); } if (input == "3") { Console.Clear(); ArrivalDateSelectionMenu(p); } if (input == "4") { Console.Clear(); ChooseParkMenu(parkDAL.ViewParks(connectionString)); } else { Console.Clear(); PrintMenuDoubleSpaced(new[] { "That is not a valid choice, please select from one of the below options: " }); ParkInformationScreen(parkName); } }