// LEVEL: RESERVATION ///////////////////////////////////////// // // // private int ReserveCampsite_View(int chosenCampsite, DateTime startDate, DateTime endDate, string partyName) { int reservationID = 0; ReservationSqlDAL dal = new ReservationSqlDAL(DatabaseConnection); reservationID = dal.ReserveCampsite(chosenCampsite, startDate, endDate, partyName); return(reservationID); }
public void MakeaReservation_ReturnsCount() { // Arrange ReservationSqlDAL dal = new ReservationSqlDAL(ConnectionString); int initialCount = dal.CountReservations(CampsiteId); // Act dal.ReserveCampsite(CampsiteId, new DateTime(2018, 09, 01), new DateTime(2018, 09, 08), "Cray-Smith"); int newCount = dal.CountReservations(CampsiteId); // Assert Assert.AreEqual(initialCount + 1, newCount); }