コード例 #1
0
        private IGetSubmissionsHistoryResultsDataAccess CreateFakeDataAccess()
        {
            IGetSubmissionsHistoryResultsDataAccess dataAccess = A.Fake <IGetSubmissionsHistoryResultsDataAccess>();

            var results = new SubmissionsHistorySearchResult()
            {
                Data = new List <SubmissionsHistorySearchData>()
                {
                    new SubmissionsHistorySearchData(),
                    new SubmissionsHistorySearchData()
                },
                ResultCount = 2
            };

            A.CallTo(() => dataAccess.GetSubmissionsHistory(A <Guid> ._, A <int> ._, A <SubmissionsHistoryOrderBy> ._, A <bool> ._))
            .Returns(results);

            return(dataAccess);
        }
コード例 #2
0
        public async Task <SubmissionsHistorySearchResult> HandleAsync(GetSubmissionsHistoryResults request)
        {
            authorization.EnsureInternalOrOrganisationAccess(request.OrganisationId);

            return(await dataAccess.GetSubmissionsHistory(request.SchemeId, request.ComplianceYear, request.Ordering, request.IncludeSummaryData));
        }