public void GetAll_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new AppointmentTestEmployeeRepository(context); // Act IEnumerable <appointment_test_clinician> result = repository.GetAll(); // Assert Assert.IsNotNull(result); Assert.AreEqual(context.appointment_test_clinician.Count(), result.Count()); }
public void GetAllFilterByAppointmentTest_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new AppointmentTestEmployeeRepository(context); int appointmentTestId = 1; // Act IEnumerable <appointment_test_clinician> result = repository.GetAllFilterByAppointmentTest(appointmentTestId); // Assert Assert.AreEqual(context.appointment_test_clinician.Where(x => x.appointmentTestId == appointmentTestId).Count(), result.Count()); Assert.AreEqual(result.Where(x => x.appointmentTestId == appointmentTestId).Count(), result.Count()); }
public void GetById_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new AppointmentTestEmployeeRepository(context); int id = 1; // Act appointment_test_clinician result = repository.GetById(id); // Assert Assert.IsNotNull(result); Assert.AreEqual(id, result.id); }
public void GetById_Test() { // Arrange TestKolgraphEntities context = new TestKolgraphEntities(); var repository = new AppointmentTestEmployeeRepository(context); var service = new AppointmentTestEmployeeService(repository); int id = 1; // Act AppointmentTestEmployeeModel result = service.GetById(id); // Assert Assert.IsNotNull(result); Assert.AreEqual(id, result.Id); }