public void WhenCalledWithValidInput_GetEmployeesForEmployer_ReturnsOkResult() { //Arrange var mockServiceResponse = new List <Employee> { new Employee { FirstName = "Adam", LastName = "Carter" } }; var inputEmployeeId = 1234; mockEmployeeService.Setup(s => s.GetEmployeesForEmployer(inputEmployeeId)).Returns(mockServiceResponse); //Act var actualResult = employerController.GetEmployeesForEmployer(inputEmployeeId); //Assert var okResult = actualResult.Result as OkObjectResult; Assert.IsNotNull(okResult); Assert.AreEqual(200, okResult.StatusCode); var employersList = okResult.Value as List <Employee>; Assert.AreEqual(1, employersList.Count); }