public async Task TestDeleteTask() { var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object); var result = await AppointmentTypeService.Delete(5); Assert.True(result); }
public void TestGetById() { var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object); var result = AppointmentTypeService.GetById(1); Assert.NotNull(result); }
public void TestGetAll() { var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object); var result = AppointmentTypeService.GetAll(); Assert.True(result.Count() == 10); }
public async Task TestUpdateTask() { var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object); var newAppointmentType = Builder <AppointmentType> .CreateNew() .With(q => q.id = 1) .Build(); var result = await AppointmentTypeService.Update(newAppointmentType); Assert.AreEqual(newAppointmentType, result); }
public async Task TestAddTask() { var AppointmentTypeService = new AppointmentTypeServices(_AppointmentTypeRepository.Object); var newAppointmentType = Builder <AppointmentType> .CreateNew() .With(q => q.id = 0) .Build(); var result = await AppointmentTypeService.Add(newAppointmentType); Assert.True(result.id == 525); }