public async Task Get_All_Fundings() { //Arrange fundingServiceMock.Setup(es => es.GetFundings()) .Returns(() => Task.FromResult(GetFundings(5))); FundingController fundingController = new FundingController(fundingServiceMock.Object); //Action var result = await fundingController.GetAll(); //Assert var objResult = result.Should().BeOfType <ObjectResult>().Subject; var fundingList = objResult.Value.Should().BeOfType <List <FundingModel> >().Subject; fundingList.Count().Should().Be(5); }