public void AuthenticateTest() { this.authController = new StrongAuthenticationController(this.vetumaAuth.Object) { ControllerContext = this.controllerContext, Url = this.urlHelper }; this.authController.Authenticate().Should().BeEmptyResult(); // Validate Uri links this.uriModel.CancelUri.AbsoluteUri.Should().NotBeNullOrWhiteSpace(); this.uriModel.ErrorUri.AbsoluteUri.Should().NotBeNullOrWhiteSpace(); this.uriModel.RedirectUri.AbsoluteUri.Should().NotBeNullOrWhiteSpace(); }
public void ProcessResultTest() { this.authController = new StrongAuthenticationController(this.vetumaAuth.Object) { ControllerContext = this.controllerContext, Url = this.urlHelper }; this.controllerContext.HttpContext.Session["VETUMA_TRANSACTION_ID"] = RandomData.GetStringWordProper(); // Unable to moch extensiom methods. No sign in code coveradge this.vetumaAuth.Setup(o => o.ProcessAuthenticationResult(It.IsAny<string>())) .Returns(new WebUser()); var result = this.authController.ProcessResult(); // result.Should().BeViewResult().WithViewName("~/Features/Home/Index.cshtml"); }