public void The_Decode_Disabled_Boolean_Works(string url) { var mock = new Mock <StartPage>(); mock.Setup(x => x.ContentLink).Returns(new ContentReference()); var mockLinkResolver = new Mock <ILinkResolver>(); mockLinkResolver .Setup(x => x.GetFriendlyUrl(It.IsAny <Url>())) .Returns(url); dependencies.Setup(x => x.LinkResolver).Returns(mockLinkResolver.Object); NameValueCollection queryString = new NameValueCollection(); queryString.Add("crnmail", "bQ7H5PmJeJHPTKJaSUwHP3VgSvah%2FyF0fs597dz0vmzWkTJOMVqAVo%2BJS9Neknh"); iframeBlockViewModel = new IFrameBlockViewModel( mockIFrameBlock.Object, dependencies.Object, DisplayOptionEnum.Full); mockIFrameBlock.Setup(x => x.Hyperlink).Returns(url); iframeBlockViewModel.QueryStringNameValueCollection = queryString; iframeBlockViewModel.LinkUrl.Should().Contain(url); }
public override ActionResult Index(IFrameBlock currentBlock) { var frameBlockViewModel = new IFrameBlockViewModel(currentBlock, WebsiteDependencies, DisplayOption) { QueryStringNameValueCollection = Request.QueryString }; return(PartialView("Index", frameBlockViewModel)); }