Esempio n. 1
0
        public void GetEmployeesWithFeedback()
        {
            IMapper <Application.Employee, Employee> employeeMapper = CreateEmployeeMapperMock();
            var appEmployee = new Application.Employee(Guid.NewGuid(), "lastName", "firstName", "title", null, false);
            var apiEmployee = new Employee();

            employeeMapper.Map(appEmployee).Returns(apiEmployee);
            repository.GetActiveEmployeesWithFeedback().Returns(new List <Application.Employee> {
                appEmployee
            });

            var result = sut.GetEmployeesWithFeedback() as OkNegotiatedContentResult <IEnumerable <Employee> >;

            Assert.IsNotNull(result);
            Assert.AreSame(apiEmployee, result.Content.Single());
        }