public void Process_Url(String pathBase, String url, String fullUrl) { helper.Url = url; helper.ViewContext.HttpContext.Request.PathBase = pathBase; helper.Process(null, output); Object expected = fullUrl; Object actual = output.Attributes["data-url"].Value; Assert.Equal(expected, actual); }
public void Process_Url(String url, String fullUrl) { helper.Url = url; IUrlHelper urlHelper = Substitute.For <IUrlHelper>(); urlHelper.Content(url).Returns("/People/All/Expand"); factory.GetUrlHelper(helper.ViewContext).Returns(urlHelper); helper.Process(null, output); Object expected = fullUrl; Object actual = output.Attributes["data-url"].Value; Assert.Equal(expected, actual); }