public async Task GetFundingPage_CallsCorrectly() { IFundingFeedService fundingFeedService = Substitute.For <IFundingFeedService>(); FundingFeedController controller = new FundingFeedController( fundingFeedService); string[] fundingStreamIds = new string[] { "1234" }; string[] fundingPeriodIds = new string[] { "1234" }; GroupingReason[] groupReasons = new GroupingReason[] { GroupingReason.Payment }; VariationReason[] variationReasons = new VariationReason[] { VariationReason.AuthorityFieldUpdated }; await controller.GetFundingPage(fundingStreamIds, fundingPeriodIds, groupReasons, variationReasons, 5, 1); await fundingFeedService .Received(1) .GetFunding(Arg.Any <HttpRequest>(), Arg.Is(1), Arg.Is(fundingStreamIds), Arg.Is(fundingPeriodIds), Arg.Is(groupReasons), Arg.Is(variationReasons), Arg.Is(5)); }
public FundingFeedController(IFundingFeedService fundingFeedsService) { Guard.ArgumentNotNull(fundingFeedsService, nameof(fundingFeedsService)); _fundingFeedsService = fundingFeedsService; }