public async Task GetCorrelationIdDetailsForPublishedFunding() { UndoTaskDetails undoTaskDetails = await _repository .GetCorrelationIdDetailsForPublishedFunding(CorrelationId); undoTaskDetails .Should() .BeEquivalentTo(new UndoTaskDetails { FundingStreamId = "DSG", FundingPeriodId = "FY-2021", TimeStamp = 1588685609 }); }
public async Task GetCorrelationIdDetailsForPublishedFunding() { UndoTaskDetails expectedDetails = NewUndoTaskDetails(); string correlationId = NewRandomString(); GivenTheCorrelationIdDetailsForCosmosQuery(@"SELECT MIN(p._ts) AS timeStamp, p.content.current.fundingStreamId, p.content.current.fundingPeriod.id AS fundingPeriodId FROM publishedFunding p WHERE p.documentType = 'PublishedFunding' AND p.content.current.correlationId = @correlationId AND p.deleted = false GROUP BY p.content.current.fundingStreamId, p.content.current.fundingPeriod.id", correlationId, expectedDetails); UndoTaskDetails actualDetails = await _repository.GetCorrelationIdDetailsForPublishedFunding(correlationId); actualDetails .Should() .BeSameAs(expectedDetails); }