Ejemplo n.º 1
0
        public async Task <ActionResult> DownloadErrorsAndWarnings(Guid pcsId, Guid dataReturnUploadId)
        {
            SchemePublicInfo scheme = await cache.FetchSchemePublicInfo(pcsId);

            DataReturnForSubmission dataReturn = await FetchDataReturnUpload(pcsId, dataReturnUploadId);

            CsvWriter <IErrorOrWarning> csvWriter = csvWriterFactory.Create <IErrorOrWarning>();

            csvWriter.DefineColumn("Type", e => e.TypeName);
            csvWriter.DefineColumn("Description", e => e.Description);

            List <IErrorOrWarning> errorsAndWarnings = new List <IErrorOrWarning>();

            errorsAndWarnings.AddRange(dataReturn.Errors);
            errorsAndWarnings.AddRange(dataReturn.Warnings);

            string csv = csvWriter.Write(errorsAndWarnings);

            string filename = string.Format(
                "{0}_{1}{2}_data_return_errors_and_warnings_{3}.csv",
                scheme.ApprovalNo,
                dataReturn.Year,
                dataReturn.Quarter,
                DateTime.Now.ToString("ddMMyyyy_HHmm"));

            byte[] fileContent = Encoding.UTF8.GetBytes(csv);

            return(File(fileContent, "text/csv", CsvFilenameFormat.FormatFileName(filename)));
        }
Ejemplo n.º 2
0
        public async void GetSubmit_HappyPath_ReturnsSubmitViewWithPopulatedViewModel()
        {
            // Arrange
            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                2015,
                QuarterType.Q4,
                A.Dummy <IReadOnlyCollection <DataReturnWarning> >(),
                A.Dummy <IReadOnlyCollection <DataReturnError> >(),
                false);

            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <FetchDataReturnForSubmission> ._))
            .WhenArgumentsMatch(args => args.Get <FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
            .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            // Act
            ActionResult result = await controller.Submit(
                new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            Assert.IsAssignableFrom <ViewResultBase>(result);
            ViewResultBase viewResult = result as ViewResultBase;

            Assert.True(viewResult.ViewName == string.Empty || viewResult.ViewName == "Submit",
                        "The GET Submit action must return the view called \"Submit\".");

            Assert.IsAssignableFrom <SubmitViewModel>(viewResult.Model);
            SubmitViewModel viewModel = viewResult.Model as SubmitViewModel;

            Assert.Equal(dataReturnForSubmission, viewModel.DataReturn);
        }
Ejemplo n.º 3
0
        public async void GetReview_WithDataReturnWithNoErrors_RedirectsToSubmit()
        {
            // Arrange
            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy <IReadOnlyCollection <DataReturnWarning> >(),
                A.Dummy <IReadOnlyCollection <DataReturnError> >(),
                false);

            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <FetchDataReturnForSubmission> ._))
            .WhenArgumentsMatch(args => args.Get <FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
            .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            // Act
            ActionResult result = await controller.Review(
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            Assert.IsAssignableFrom <RedirectToRouteResult>(result);
            RedirectToRouteResult redirectToRouteResult = result as RedirectToRouteResult;

            Assert.Equal("Submit", redirectToRouteResult.RouteValues["action"]);
            Assert.Equal(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), redirectToRouteResult.RouteValues["pcsId"]);
            Assert.Equal(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"), redirectToRouteResult.RouteValues["dataReturnUploadId"]);
        }
Ejemplo n.º 4
0
        public async void GetSubmit_WithDataReturnWithDifferentOrganisationId_ThrowsAnException()
        {
            // Arrange
            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy <IReadOnlyCollection <DataReturnWarning> >(),
                A.Dummy <IReadOnlyCollection <DataReturnError> >(),
                false);

            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <FetchDataReturnForSubmission> ._))
            .WhenArgumentsMatch(args => args.Get <FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
            .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);
            // Act
            Func <Task <ActionResult> > testCode = async() =>
                                                   await controller.Submit(
                new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            await Assert.ThrowsAnyAsync <Exception>(testCode);
        }
Ejemplo n.º 5
0
        public async void PostUpload_WithDataReturnWithErrors_RedirectsToReview()
        {
            // Arrange
            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <ProcessDataReturnXmlFile> ._))
            .Returns(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            DataReturnError error = new DataReturnError("Test Error");

            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy <IReadOnlyCollection <DataReturnWarning> >(),
                new List <DataReturnError>()
            {
                error
            },
                false);

            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <FetchDataReturnForSubmission> ._))
            .WhenArgumentsMatch(args => args.Get <FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
            .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            PCSFileUploadViewModel viewModel = new PCSFileUploadViewModel();

            var controllerContext = A.Fake <HttpContextBase>();

            controller.ControllerContext = new ControllerContext(controllerContext, new RouteData(), controller);
            var request = A.Fake <HttpRequestBase>();

            A.CallTo(() => controllerContext.Request).Returns(request);

            // Act
            ActionResult result = await controller.Upload(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), viewModel);

            // Assert
            Assert.IsAssignableFrom <RedirectToRouteResult>(result);
            RedirectToRouteResult redirectToRouteResult = result as RedirectToRouteResult;

            Assert.Equal("Review", redirectToRouteResult.RouteValues["action"]);
            Assert.Equal(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), redirectToRouteResult.RouteValues["pcsId"]);
            Assert.Equal(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"), redirectToRouteResult.RouteValues["dataReturnUploadId"]);
        }
Ejemplo n.º 6
0
        public async Task <ActionResult> Submit(Guid pcsId, Guid dataReturnUploadId)
        {
            await SetBreadcrumb(pcsId);

            DataReturnForSubmission dataReturn = await FetchDataReturnUpload(pcsId, dataReturnUploadId);

            if (dataReturn.Errors.Count != 0)
            {
                return(RedirectToAction("Review", new { pcsId, dataReturnUploadId }));
            }

            SubmitViewModel viewModel = new SubmitViewModel()
            {
                DataReturn = dataReturn,
                PcsId      = pcsId
            };

            return(View(viewModel));
        }
Ejemplo n.º 7
0
        public async Task <ActionResult> Upload(Guid pcsId, PCSFileUploadViewModel model)
        {
            if (!ModelState.IsValid)
            {
                if (Request.IsAjaxRequest())
                {
                    return(new HttpStatusCodeResult(500));
                }
                else
                {
                    await SetBreadcrumb(pcsId);

                    return(View(model));
                }
            }

            Guid dataReturnUploadId;

            using (var client = apiClient())
            {
                model.PcsId = pcsId;
                var request = mapper.Map <PCSFileUploadViewModel, ProcessDataReturnXmlFile>(model);
                dataReturnUploadId = await client.SendAsync(User.GetAccessToken(), request);
            }

            if (Request.IsAjaxRequest())
            {
                return(Json(dataReturnUploadId));
            }
            else
            {
                DataReturnForSubmission dataReturn = await FetchDataReturnUpload(pcsId, dataReturnUploadId);

                if (dataReturn.Errors.Count == 0)
                {
                    return(RedirectToAction("Submit", new { pcsId = pcsId, dataReturnUploadId = dataReturnUploadId }));
                }
                else
                {
                    return(RedirectToAction("Review", new { pcsId = pcsId, dataReturnUploadId = dataReturnUploadId }));
                }
            }
        }
Ejemplo n.º 8
0
        public async Task <ActionResult> Submit(Guid pcsId, Guid dataReturnUploadId, SubmitViewModel viewModel)
        {
            await SetBreadcrumb(pcsId);

            if (!ModelState.IsValid)
            {
                DataReturnForSubmission dataReturn = await FetchDataReturnUpload(pcsId, dataReturnUploadId);

                viewModel.DataReturn = dataReturn;
                viewModel.PcsId      = pcsId;

                return(View(viewModel));
            }

            using (var client = apiClient())
            {
                await client.SendAsync(User.GetAccessToken(), new SubmitDataReturnUpload(dataReturnUploadId));
            }

            return(RedirectToAction("SuccessfulSubmission", new { pcsId, dataReturnUploadId }));
        }
Ejemplo n.º 9
0
        public async void GetReview_HappyPath_ReturnsSubmitViewWithPopulatedViewModel()
        {
            // Arrange
            DataReturnError error = new DataReturnError("Test Error");

            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy <IReadOnlyCollection <DataReturnWarning> >(),
                new List <DataReturnError>()
            {
                error
            },
                false);

            A.CallTo(() => weeeClient.SendAsync(A <string> ._, A <FetchDataReturnForSubmission> ._))
            .WhenArgumentsMatch(args => args.Get <FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
            .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            // Act
            ActionResult result = await controller.Review(
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            Assert.IsAssignableFrom <ViewResultBase>(result);
            ViewResultBase viewResult = result as ViewResultBase;

            Assert.True(viewResult.ViewName == "Submit",
                        "The GET Review action must return the view called \"Submit\" when the data return has no errors.");

            Assert.IsAssignableFrom <SubmitViewModel>(viewResult.Model);
            SubmitViewModel viewModel = viewResult.Model as SubmitViewModel;

            Assert.Equal(dataReturnForSubmission, viewModel.DataReturn);
        }
Ejemplo n.º 10
0
        public async Task HandleAsync_ForDataReturnWithMultipleErrors_ReturnsErrorsByLineNumberOrder()
        {
            // Arrange
            DataReturnUpload dataReturnsUpload = new DataReturnUpload(
                A.Dummy <Scheme>(),
                A.Dummy <string>(),
                new List <DataReturnUploadError>()
            {
                new DataReturnUploadError(ErrorLevel.Error, UploadErrorType.Schema, "Error on 55 line no", 55),
                new DataReturnUploadError(ErrorLevel.Error, UploadErrorType.Schema, "Error on 5 line no", 5),
                new DataReturnUploadError(ErrorLevel.Error, UploadErrorType.Schema, "Error on 75 line no", 75),
                new DataReturnUploadError(ErrorLevel.Error, UploadErrorType.Schema, "Error without line no")
            },
                A.Dummy <string>(),
                A.Dummy <int>(),
                A.Dummy <int>());

            IFetchDataReturnForSubmissionDataAccess dataAccess = A.Fake <IFetchDataReturnForSubmissionDataAccess>();

            A.CallTo(() => dataAccess.FetchDataReturnUploadAsync(A <Guid> ._)).Returns(dataReturnsUpload);

            FetchDataReturnForSubmissionHandler handler = new FetchDataReturnForSubmissionHandler(
                A.Dummy <IWeeeAuthorization>(),
                dataAccess);

            Requests.DataReturns.FetchDataReturnForSubmission request = new Requests.DataReturns.FetchDataReturnForSubmission(
                A.Dummy <Guid>());

            // Act
            DataReturnForSubmission result = await handler.HandleAsync(request);

            // Assert
            Assert.Equal(4, result.Errors.Count);
            Assert.True(result.Errors.ElementAt(0).Description == "Error without line no" &&
                        result.Errors.ElementAt(1).Description == "Error on 5 line no" &&
                        result.Errors.ElementAt(2).Description == "Error on 55 line no" &&
                        result.Errors.ElementAt(3).Description == "Error on 75 line no");
        }
Ejemplo n.º 11
0
        public async Task HandleAsync_ForDataReturnWithOneErrorWithErrorLevelWarning_ReturnsDtoWithOneWarning()
        {
            // Arrange
            DataReturnUploadError dataReturnsUploadWarning = new DataReturnUploadError(
                ErrorLevel.Warning,
                UploadErrorType.Business,
                A.Dummy <string>());

            IFetchDataReturnForSubmissionDataAccess dataAccess = FetchDummyDataReturnWithWarning(dataReturnsUploadWarning);

            FetchDataReturnForSubmissionHandler handler = new FetchDataReturnForSubmissionHandler(
                A.Dummy <IWeeeAuthorization>(),
                dataAccess);

            Requests.DataReturns.FetchDataReturnForSubmission request = new Requests.DataReturns.FetchDataReturnForSubmission(
                A.Dummy <Guid>());

            // Act
            DataReturnForSubmission result = await handler.HandleAsync(request);

            // Assert
            Assert.Equal(1, result.Warnings.Count);
        }
        public async void PostSubmit_WithInvalidModelState_ReturnsSubmitViewWithPopulatedViewModel()
        {
            // Arrange
            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                2015,
                QuarterType.Q4,
                A.Dummy<IReadOnlyCollection<DataReturnWarning>>(),
                A.Dummy<IReadOnlyCollection<DataReturnError>>(),
                false);

            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<FetchDataReturnForSubmission>._))
                .WhenArgumentsMatch(args => args.Get<FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
                .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            controller.ModelState.AddModelError("Key", "Some Error");

            // Act
            ActionResult result = await controller.Submit(
                    new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                    new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                    new SubmitViewModel());

            // Assert
            Assert.IsAssignableFrom<ViewResultBase>(result);
            ViewResultBase viewResult = result as ViewResultBase;

            Assert.True(viewResult.ViewName == string.Empty || viewResult.ViewName == "Submit",
                "The POST Submit action must return the view called \"Submit\" when the model state is invalid.");

            Assert.IsAssignableFrom<SubmitViewModel>(viewResult.Model);
            SubmitViewModel viewModel = viewResult.Model as SubmitViewModel;

            Assert.Equal(dataReturnForSubmission, viewModel.DataReturn);
        }
        public async void GetSubmit_WithDataReturnWithErrors_RedirectsToReview()
        {
            // Arrange            
            DataReturnError error = new DataReturnError("Test Error");

            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy<IReadOnlyCollection<DataReturnWarning>>(),
                new List<DataReturnError>() { error },
                false);

            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<FetchDataReturnForSubmission>._))
                .WhenArgumentsMatch(args => args.Get<FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
                .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            // Act
            ActionResult result = await controller.Submit(
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            Assert.IsAssignableFrom<RedirectToRouteResult>(result);
            RedirectToRouteResult redirectToRouteResult = result as RedirectToRouteResult;

            Assert.Equal("Review", redirectToRouteResult.RouteValues["action"]);
            Assert.Equal(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), redirectToRouteResult.RouteValues["pcsId"]);
            Assert.Equal(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"), redirectToRouteResult.RouteValues["dataReturnUploadId"]);
        }
        public async void GetSubmit_WithDataReturnWithDifferentOrganisationId_ThrowsAnException()
        {
            // Arrange           
            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy<IReadOnlyCollection<DataReturnWarning>>(),
                A.Dummy<IReadOnlyCollection<DataReturnError>>(),
                false);

            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<FetchDataReturnForSubmission>._))
                .WhenArgumentsMatch(args => args.Get<FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
                .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);
            // Act
            Func<Task<ActionResult>> testCode = async () =>
                await controller.Submit(
                    new Guid("AA7DA88A-19AF-4130-A24D-45389D97B274"),
                    new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            await Assert.ThrowsAnyAsync<Exception>(testCode);
        }
        public async void GetReview_HappyPath_ReturnsSubmitViewWithPopulatedViewModel()
        {
            // Arrange           
            DataReturnError error = new DataReturnError("Test Error");

            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy<IReadOnlyCollection<DataReturnWarning>>(),
                new List<DataReturnError>() { error },
                false);

            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<FetchDataReturnForSubmission>._))
                .WhenArgumentsMatch(args => args.Get<FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
                .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            // Act
            ActionResult result = await controller.Review(
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            // Assert
            Assert.IsAssignableFrom<ViewResultBase>(result);
            ViewResultBase viewResult = result as ViewResultBase;

            Assert.True(viewResult.ViewName == "Submit",
                "The GET Review action must return the view called \"Submit\" when the data return has no errors.");

            Assert.IsAssignableFrom<SubmitViewModel>(viewResult.Model);
            SubmitViewModel viewModel = viewResult.Model as SubmitViewModel;

            Assert.Equal(dataReturnForSubmission, viewModel.DataReturn);
        }
        public async void PostUpload_WithDataReturnWithErrors_RedirectsToReview()
        {
            // Arrange   
            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<ProcessDataReturnXmlFile>._))
                .Returns(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"));

            DataReturnError error = new DataReturnError("Test Error");

            DataReturnForSubmission dataReturnForSubmission = new DataReturnForSubmission(
                new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"),
                new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"),
                2015,
                QuarterType.Q4,
                A.Dummy<IReadOnlyCollection<DataReturnWarning>>(),
                new List<DataReturnError>() { error },
                false);

            A.CallTo(() => weeeClient.SendAsync(A<string>._, A<FetchDataReturnForSubmission>._))
                .WhenArgumentsMatch(args => args.Get<FetchDataReturnForSubmission>("request").DataReturnUploadId == new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"))
                .Returns(dataReturnForSubmission);

            DataReturnsController controller = GetDummyDataReturnsController(weeeClient);

            PCSFileUploadViewModel viewModel = new PCSFileUploadViewModel();

            var controllerContext = A.Fake<HttpContextBase>();
            controller.ControllerContext = new ControllerContext(controllerContext, new RouteData(), controller);
            var request = A.Fake<HttpRequestBase>();
            A.CallTo(() => controllerContext.Request).Returns(request);

            // Act
            ActionResult result = await controller.Upload(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), viewModel);

            // Assert
            Assert.IsAssignableFrom<RedirectToRouteResult>(result);
            RedirectToRouteResult redirectToRouteResult = result as RedirectToRouteResult;

            Assert.Equal("Review", redirectToRouteResult.RouteValues["action"]);
            Assert.Equal(new Guid("DDE08793-D655-4CDD-A87A-083307C1AA66"), redirectToRouteResult.RouteValues["pcsId"]);
            Assert.Equal(new Guid("06FFB265-46D3-4CE3-805A-A81F1B11622A"), redirectToRouteResult.RouteValues["dataReturnUploadId"]);
        }