예제 #1
0
        public void TestAppointmentEdit()
        {
            // arrange
            int result = 0;
            AppointmentLocationVM oldAppointment = new AppointmentLocationVM()
            {
                AppointmentID         = 1,
                AdoptionApplicationID = 1,
                AppointmentTypeID     = "InHomeInspection",
                DateTime         = new DateTime(2020, 5, 1, 12, 30, 00),
                Notes            = "",
                Decicion         = "Undecided",
                LocationID       = 1,
                LocationName     = "Home",
                LocationAddress1 = "123 Real Ave",
                LocationCity     = "Marion",
                LocationState    = "IA",
                LocationZip      = "52402"
            };
            AppointmentLocationVM newAppointment = new AppointmentLocationVM()
            {
                AppointmentID         = 1,
                AdoptionApplicationID = 1,
                AppointmentTypeID     = "InHomeInspection",
                DateTime         = new DateTime(2020, 5, 12, 12, 30, 00),
                Notes            = "",
                Decicion         = "Undecided",
                LocationID       = 1,
                LocationName     = "Home",
                LocationAddress1 = "123 Real Ave",
                LocationCity     = "Marion",
                LocationState    = "IA",
                LocationZip      = "52402"
            };
            IAppointmentManager appointmentManager = new AppointmentManager(_appointmentAccessor);

            // act
            result = appointmentManager.EditAppointment(oldAppointment, newAppointment);

            // assert
            Assert.AreEqual(1, result);
        }