public async Task <ActionResult> Gateway()
        {
            var url = await _employerAccountOrchestrator.GetGatewayUrl(
                Url.Action(ControllerConstants.GateWayResponseActionName,
                           ControllerConstants.EmployerAccountControllerName,
                           null,
                           HttpContext.Request.Url?.Scheme));

            return(Redirect(url));
        }
예제 #2
0
        public async Task ThenTheHmrcServiceIsCalled()
        {
            //Arrange
            var redirectUrl = "myUrl";

            _mediator.Setup(x => x.SendAsync(It.IsAny <GetGatewayInformationQuery>())).ReturnsAsync(new GetGatewayInformationResponse {
                Url = "someurl"
            });

            //Act
            await _employerAccountOrchestrator.GetGatewayUrl(redirectUrl);

            //Assert
            _mediator.Verify(x => x.SendAsync(It.Is <GetGatewayInformationQuery>(c => c.ReturnUrl.Equals(redirectUrl))));
        }
예제 #3
0
 public async Task <ActionResult> Gateway()
 {
     return(Redirect(await _employerAccountOrchestrator.GetGatewayUrl(Url.Action("GateWayResponse", "EmployerAccount", null, Request.Url.Scheme))));
 }