public async Task Then_User_Is_Redirected_To_SelectLegalEntity_Page() { //Arrange _informViewModel.TransferConnections = new List <TransferConnection>(); //Act var result = await _controller.SelectTransferConnection(_informRequest); //Assert var redirectToActionResult = result as RedirectToActionResult; Assert.AreEqual("SelectLegalEntity", redirectToActionResult.ActionName); }
public async Task Then_User_Is_Redirected_To_TransferConnections_Page() { //Arrange _linkGeneratorResult = $"accounts/{_informRequest.AccountHashedId}/apprentices/transferConnection/create"; _linkGenerator.Setup(x => x.CommitmentsLink(It.IsAny <string>())).Returns(_linkGeneratorResult); //Act var result = await _controller.SelectTransferConnection(_informRequest); //Assert Assert.IsInstanceOf <RedirectResult>(result); var redirect = (RedirectResult)result; Assert.AreEqual(_linkGeneratorResult, redirect.Url); }