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); }
public void TestDeletingValidAppointmentRecord() { // Arrange bool result = false; IVetAppointmentManager manager = new VetAppointmentManager(_vetAppointmentAccessor); AnimalVetAppointment vetAppointment = new AnimalVetAppointment() { VetAppointmentID = 1, AnimalID = 1, UserID = 10000, AppointmentDateTime = DateTime.Now, AppointmentDescription = "test", ClinicAddress = "test", VetName = "test" }; // Act manager.AddAnimalVetAppointmentRecord(vetAppointment); result = manager.RemoveAnimalVetAppointment(vetAppointment); // Assert Assert.IsTrue(result); }
public void TestAddAnimalVetAppointmentRecord() { // Arrange bool result = false; IVetAppointmentManager vetAppointmentManager = new VetAppointmentManager(_vetAppointmentAccessor); AnimalVetAppointment animalVetAppointment = new AnimalVetAppointment() { AnimalID = 4, VetAppointmentID = 4, AnimalName = "Test", UserID = 4, FollowUpDateTime = null, AppointmentDateTime = DateTime.Now, ClinicAddress = "Test", VetName = "Test", AppointmentDescription = "Test" }; // Act result = vetAppointmentManager.AddAnimalVetAppointmentRecord(animalVetAppointment); // Assert Assert.IsTrue(result); }