public async Task <ActionResult> Gateway() { var url = await _employerAccountOrchestrator.GetGatewayUrl( Url.Action(ControllerConstants.GateWayResponseActionName, ControllerConstants.EmployerAccountControllerName, null, HttpContext.Request.Url?.Scheme)); return(Redirect(url)); }
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)))); }
public async Task <ActionResult> Gateway() { return(Redirect(await _employerAccountOrchestrator.GetGatewayUrl(Url.Action("GateWayResponse", "EmployerAccount", null, Request.Url.Scheme)))); }