public async Task Get_WhenEnrollmentsExist_ShouldReturnAllEnrollments() { //Arrange Dictionary <string, string> dict = new Dictionary <string, string>(); dict.Add("UserId", "123456"); dict.Add("role", "Admin"); _enrollmentProcessorMock.Setup(p => p.GetAll(null)).ReturnsAsync(_enrollments); var controller = new EnrollmentController(_enrollmentProcessorMock.Object); //Act var response = await controller.GetAsync(); //Assert var okResult = Assert.IsType <OkObjectResult>(response); var returnValue = Assert.IsType <List <Enrollment> >(okResult.Value); Assert.NotEmpty(returnValue); }