public async Task <List <ApplicationResponse> > Handle(GetPreviousApplicationsRequest request, CancellationToken cancellationToken)
        {
            var result = await _applyRepository.GetPreviousApplicationsForStandard(request.OrgId, request.StandardReference);

            return(result != null
                ? Mapper.Map <List <ApplySummary>, List <ApplicationResponse> >(result)
                : null);
        }
示例#2
0
        public async Task Then_org_previous_application_is_retrieved_and_mapped_correctly()
        {
            //Arrange
            var request = new GetPreviousApplicationsRequest(new Guid("a623f742-2607-4bc0-85a7-ec5b6dd6a593"), "ST0001");

            //Act
            var result = await _sut.Handle(request, new CancellationToken());

            //Assert
            result.Count.Should().Equals(1);
            result[0].StandardCode.Should().Equals(59);
        }