public void GetPublishedProviderVersions() { string fundingStreamId = NewRandomString(); string fundingPeriodId = NewRandomString(); long timeStamp = NewRandomTimeStamp(); ICosmosDbFeedIterator <PublishedProviderVersion> expectedFeed = NewFeedIterator <PublishedProviderVersion>(); GivenTheFeedIterator(@"SELECT * FROM publishedProviderVersion p WHERE p.documentType = 'PublishedProviderVersion' AND p._ts >= @sinceTimeStamp AND p.content.fundingStreamId = @fundingStreamId AND p.content.fundingPeriodId = @fundingPeriodId AND p.deleted = false", expectedFeed, ("@fundingPeriodId", fundingPeriodId), ("@fundingStreamId", fundingStreamId), ("@sinceTimeStamp", timeStamp)); ICosmosDbFeedIterator <PublishedProviderVersion> actualFeedIterator = _repository.GetPublishedProviderVersions(fundingStreamId, fundingPeriodId, timeStamp); actualFeedIterator .Should() .BeSameAs(expectedFeed); }
public async Task GetPublishedProviderVersions() { ICosmosDbFeedIterator <PublishedProviderVersion> feed = _repository.GetPublishedProviderVersions("DSG", "FY-2021", 1588684299); feed.HasMoreResults .Should() .BeTrue(); IEnumerable <PublishedProviderVersion> documents = await feed.ReadNext(); documents .Should() .NotBeEmpty(); }