Exemple #1
0
        /// <summary>
        /// Wes Richardson
        /// Created: 2019/04/11
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Detail View of an Appointment</returns>
        public ActionResult Details(int id)
        {
            Appointment appt = null;

            try
            {
                appt = _appointmentMgr.RetrieveAppointmentByID(id);
            }
            catch (Exception)
            {
                throw;
            }
            return(View(appt));
        }
Exemple #2
0
        public void RetrieveAppointmentByID()
        {
            Appointment apt1 = new Appointment()
            {
                AppointmentID   = 100000,
                AppointmentType = "Spa",
                GuestID         = 100000,
                StartDate       = new DateTime(2020, 12, 25, 10, 30, 50),
                EndDate         = new DateTime(2020, 12, 25, 10, 50, 50),
                Description     = "Spa"
            };

            var apt2 = _appMgr.RetrieveAppointmentByID(apt1.AppointmentID);

            Assert.AreEqual(apt1.AppointmentType, apt2.AppointmentType);
            Assert.AreEqual(apt1.StartDate, apt2.StartDate);
            Assert.AreEqual(apt1.EndDate, apt2.EndDate);
            Assert.AreEqual(apt1.GuestID, apt2.GuestID);
            Assert.AreEqual(apt1.Description, apt2.Description);
        }