public void Task_GetEmployeeAppointmentById_MatchResult()
        {
            //Arrange
            var employeeAppointmentId            = 1;
            var employeeAppointmentAppointmentId = 1;
            IQueryable <EmployeeAppointment> employeeAppointmentList = new List <EmployeeAppointment>()
            {
                new EmployeeAppointment()
                {
                    AppointmentId = employeeAppointmentAppointmentId, Id = employeeAppointmentId
                }
            }.AsQueryable();

            EmployeeAppointmentRepositoryMock.Setup(m => m.GetById(employeeAppointmentId)).Returns(employeeAppointmentList.FirstOrDefault(s => s.Id == employeeAppointmentId)).Verifiable();



            //Act
            var actual = EmployeeAppointmentsBusinessManager.GetById(employeeAppointmentId);

            //Assert
            Assert.IsInstanceOfType(actual, typeof(EmployeeAppointment));     //passes


            Assert.AreEqual(employeeAppointmentId, actual.Id);                       //assert that actual result was as appointmentId
            Assert.AreEqual(employeeAppointmentAppointmentId, actual.AppointmentId); //assert that actual result was as appointmentId
        }
        public void Task_GetNotFoundEmployeeAppointmentById_Return_Null()
        {
            //Arrange
            var employeeAppointmentId         = 1;
            var notFoundEmployeeAppointmentId = 2;
            var appointmentId = 1;
            IQueryable <EmployeeAppointment> employeeAppointmentList = new List <EmployeeAppointment>()
            {
                new EmployeeAppointment()
                {
                    AppointmentId = appointmentId, Id = employeeAppointmentId
                }
            }.AsQueryable();

            EmployeeAppointmentRepositoryMock.Setup(m => m.GetById(notFoundEmployeeAppointmentId)).Returns(employeeAppointmentList.FirstOrDefault(s => s.Id == notFoundEmployeeAppointmentId)).Verifiable();



            //Act
            var actual = EmployeeAppointmentsBusinessManager.GetById(notFoundEmployeeAppointmentId);

            //Assert
            EmployeeAppointmentRepositoryMock.Verify(); //verify that GetByID was called based on setup.
            Assert.IsNull(actual);                      //assert that a result was returned
        }