public void Should_be_able_to_Provide_the_valid_Mime_type() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").AcceptType("image/gif"); string htmlTextBox = control.ToString(); var cq = CQ.Create(htmlTextBox); cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be("image/gif"); }
public void Should_be_able_to_Generate_the_target_for_the_Browser_to_open_in_TopWindow() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").OpenInTopWindow(); string HTMLAnchorTag = control.ToString(); var cq = CQ.Create(HTMLAnchorTag); cq.Attr(HTMLATTRIBUTE.Target).Should().Be(HTMLATTRIBUTE.TOP); }
public void Should_be_able_to_generate_the_rel_to_the_Link_from_Current_Context() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").Rel("next"); string HTMLAnchorTag = control.ToString(); var cq = CQ.Create(HTMLAnchorTag); cq.Attr(HTMLATTRIBUTE.REL).Should().Be("next"); }
public void Should_be_able_to_Generate_the_language_tag_with_The_A() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").AcceptedLanguage("en"); string htmlTextBox = control.ToString(); var cq = CQ.Create(htmlTextBox); cq.Attr(HTMLATTRIBUTE.Language).Should().Be("en"); }
public void Should_be_able_to_generate_Href_With_the_A_tag() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").Name("Name"); string HTMLAnchorTag = control.ToString(); var cq = CQ.Create(HTMLAnchorTag); cq.Attr("name").Should().Be("Name"); cq.Attr(HTMLATTRIBUTE.HREF).Should().Be("/api/app"); }
public void Should_provide_the_Text_in_the_value_tag() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").Name("Name").Text("Some Link"); string HTMLAnchorTag = control.ToString(); var cq = CQ.Create(HTMLAnchorTag); cq.Attr("name").Should().Be("Name"); cq.Document.FirstChild.InnerText.Should().Be("Some Link"); }
public void Should_be_able_to_Throw_error_if_the_invalid_Mime_Type() { IHyperMediaControlBuilder control = new HtmlActionTag("/api/app").AcceptType(@"image\gif"); string htmlTextBox = control.ToString(); var cq = CQ.Create(htmlTextBox); }