public void EmployeeDetails_ReturnsSuccess_Employees() { //Arrange Employees employee1 = new Employees() { Id = 1, Email = "*****@*****.**", Password = "******" }; Employees employee2 = new Employees() { Id = 2, Email = "*****@*****.**", Password = "******" }; _employeesService.Setup(service => service.GetAllEmployees()).Returns(new[] { employee1, employee2 }); //Act var result = controller.EmployeeDetails() as IActionResult; // Assert Assert.IsType <OkObjectResult>(result); }