public void Should_Return_All_Employees_Not_Deleted() { //Arrange var employeesNotDeleted = EmployeeDummies.CreateListOfEmployees().Where(e => !e.IsDeleted); var employeeRepositoryMock = new Mock<IEmployeeRepository>(); employeeRepositoryMock.Setup(x => x.GetAllEmployeesNotDeleted()).Returns(employeesNotDeleted); var employeeService = new EmployeeService(employeeRepositoryMock.Object, new StubUnitOfWork()); //Act var employees = employeeService.ListEmployeesNotDeleted(); //Assert employeeRepositoryMock.VerifyAll(); Assert.IsFalse(employees.Any(e => e.IsDeleted)); }