Exemplo n.º 1
0
        public void TestUpdateAnimalVetAppointmentRecord()
        {
            // Arrange
            bool result = false;
            IVetAppointmentManager vetAppointmentManager = new VetAppointmentManager(_vetAppointmentAccessor);
            AnimalVetAppointment   oldRecord             = new AnimalVetAppointment()
            {
                VetAppointmentID       = 1,
                AnimalID               = 1,
                AnimalName             = "qwerty",
                UserID                 = 1,
                AppointmentDateTime    = DateTime.Now,
                AppointmentDescription = "asdf",
                ClinicAddress          = "1234 asdf",
                VetName                = "awerga",
                FollowUpDateTime       = null,
                Active                 = true
            };
            AnimalVetAppointment newRecord = new AnimalVetAppointment()
            {
                VetAppointmentID       = 1,
                AnimalID               = 1,
                AnimalName             = "qwerty",
                UserID                 = 3,
                AppointmentDateTime    = DateTime.Now,
                AppointmentDescription = "awefuhioawefouh",
                ClinicAddress          = "1234 test",
                VetName                = "awerga",
                FollowUpDateTime       = DateTime.Now,
                Active                 = true
            };

            // Act
            vetAppointmentManager.AddAnimalVetAppointmentRecord(oldRecord);
            result = vetAppointmentManager.EditAnimalVetAppointmentRecord(oldRecord, newRecord);

            // Assert
            Assert.IsTrue(result);
        }