public void AdminUrl_WithoutSubfolder_ReturnsCorrectUrl() { UrlHelper helper = SetupUrlHelper("/"); //act string url = helper.AdminUrl("Feedback.aspx", new { status = 2 }); //assert Assert.AreEqual("/admin/Feedback.aspx?status=2", url); }
public void AdminUrl_WithPage_RendersAdminUrlToPage() { //arrange UrlHelper helper = SetupUrlHelper("/"); //act string url = helper.AdminUrl("log.aspx"); //assert Assert.AreEqual("/admin/log.aspx", url); }
public void AdminUrl_WithSubfolderAndApplicationPath_ReturnsCorrectUrl() { var routeData = new RouteData(); routeData.Values.Add("subfolder", "subfolder"); UrlHelper helper = SetupUrlHelper("/Subtext.Web", routeData); //act string url = helper.AdminUrl("Feedback.aspx", new { status = 2 }); //assert Assert.AreEqual("/Subtext.Web/subfolder/admin/Feedback.aspx?status=2", url); }
public void AdminUrl_WithBlogHavingSubfolderAndVirtualPath_RendersAdminUrlToPage() { //arrange var routeData = new RouteData(); routeData.Values.Add("subfolder", "sub"); UrlHelper helper = SetupUrlHelper("/Subtext.Web", routeData); //act string url = helper.AdminUrl("log.aspx"); //assert Assert.AreEqual("/Subtext.Web/sub/admin/log.aspx", url); }
protected override void WriteChannel() { var image = new RssImageElement(GetRssImage(), CommentEntry.Title, UrlHelper.EntryUrl(CommentEntry).ToFullyQualifiedUrl(Blog), 77, 60, null); Uri url = UrlHelper.AdminUrl("Feedback.aspx", new { status = 2 }).ToFullyQualifiedUrl(Blog); BuildChannel(CommentEntry.Title, url, CommentEntry.Email, CommentEntry.HasDescription ? CommentEntry.Description : CommentEntry.Body, Blog.Language, Blog.Author, Blog.LicenseUrl, image); }
protected override string GetLinkFromItem(LogEntry item) { return(UrlHelper.AdminUrl("ErrorLog.aspx")); }
protected override string GetLinkFromItem(Referrer item) { return(UrlHelper.AdminUrl("Referrers.aspx")); }