Ejemplo n.º 1
0
        public async Task <ActionResult> NilReturnConfirm(SubmittedReturnViewModel viewModel)
        {
            using (var client = apiClient())
            {
                await client.SendAsync(User.GetAccessToken(), new SubmitReturn(viewModel.ReturnId, true));

                return(AeRedirect.Confirmation(viewModel.ReturnId));
            }
        }
Ejemplo n.º 2
0
        public void ConfirmationRedirectCalled_ShouldReturnCorrectRoute()
        {
            var returnId = Guid.NewGuid();

            var newRoute = AeRedirect.Confirmation(returnId);

            Assert.Equal(AeRedirect.ReturnsRouteName, newRoute.RouteName);
            Assert.Equal("Returns", newRoute.RouteValues["controller"]);
            Assert.Equal("Confirmation", newRoute.RouteValues["action"]);
            Assert.Equal(returnId, newRoute.RouteValues["returnId"]);
        }