public async Task CreateFundable() { Console.WriteLine("CreateFundable"); var logger = ServiceScope.ServiceProvider.GetService <ILogger <FundingTest> >(); var fundableReference = CreateFundableReference.FromTimestamp(GetUniqueNow()); logger.LogInformation($"Fundable reference = {fundableReference}"); var fundableId = await FundingMicroService.AllocateFundableAsync(fundableReference); logger.LogInformation($"Fundable ID = {fundableId}"); var fundable = await FundingMicroService.GetFundableAsync(fundableId); Assert.IsNotNull(fundable); logger.LogInformation($"Fundable retrieved. Fundable reference = {fundable.FundableReference}"); Assert.AreEqual(fundableReference, fundable.FundableReference); var fundables = await FundingMicroService.GetFundableSummariesAsync(null, null, null); Assert.IsNotNull(fundables); Assert.IsNotNull(fundables.Summaries); Assert.IsTrue(fundables.Summaries.Any(r => r.FundableReference == fundableReference)); }
private async Task <FundableList> GetFundableListAsync() { var pagingState = this.GetPagingState(0); var(hasFundsRequired, recordCount) = ModelFactory.ParsePagingStateFilter(pagingState.Filter); var mFundables = await FundingMicroService.GetFundableSummariesAsync(null, hasFundsRequired, recordCount); var model = ModelFactory.CreateFundableList(mFundables.Summaries, pagingState); return(model); }