@Test public void should_generate_link_tag_with_href() { tag = link = new HtmlLink("myHref"); assertThat(link.toHtml().toString()).isEqualTo("<link rel=\"stylesheet\" href=\"myHref\"></link>"); }
@Override public StringBuilder toHtml() { StringBuilder html = new StringBuilder(); if (StringUtils.isNotBlank(this.condition)) { html.append(IF_OPENING_CONDITION); html.append(this.condition); html.append(IF_CLOSING_CONDITION); } html.append(super.toHtml()); if (StringUtils.isNotBlank(this.condition)) { html.append(ENDIF_CONDITION); } return html; }
HtmlLink extends AbstractHtmlTag { @Override public StringBuilder toHtml() { StringBuilder html = new StringBuilder(); if (StringUtils.isNotBlank(this.condition)) { html.append(IF_OPENING_CONDITION); html.append(this.condition); html.append(IF_CLOSING_CONDITION); } html.append(super.toHtml()); if (StringUtils.isNotBlank(this.condition)) { html.append(ENDIF_CONDITION); } return html; } }
HtmlLink extends AbstractHtmlTag { @Override public StringBuilder toHtml() { StringBuilder html = new StringBuilder(); if (StringUtils.isNotBlank(this.condition)) { html.append(IF_OPENING_CONDITION); html.append(this.condition); html.append(IF_CLOSING_CONDITION); } html.append(super.toHtml()); if (StringUtils.isNotBlank(this.condition)) { html.append(ENDIF_CONDITION); } return html; } HtmlLink();  HtmlLink(String href);  HtmlLink(String href, String condition); }
HtmlLink extends AbstractHtmlTag { @Override public StringBuilder toHtml() { StringBuilder html = new StringBuilder(); if (StringUtils.isNotBlank(this.condition)) { html.append(IF_OPENING_CONDITION); html.append(this.condition); html.append(IF_CLOSING_CONDITION); } html.append(super.toHtml()); if (StringUtils.isNotBlank(this.condition)) { html.append(ENDIF_CONDITION); } return html; } HtmlLink();  HtmlLink(String href);  HtmlLink(String href, String condition); String getHref(); void setHref(String href); @Override StringBuilder toHtml(); }
HtmlLink extends AbstractHtmlTag { @Override public StringBuilder toHtml() { StringBuilder html = new StringBuilder(); if (StringUtils.isNotBlank(this.condition)) { html.append(IF_OPENING_CONDITION); html.append(this.condition); html.append(IF_CLOSING_CONDITION); } html.append(super.toHtml()); if (StringUtils.isNotBlank(this.condition)) { html.append(ENDIF_CONDITION); } return html; } HtmlLink();  HtmlLink(String href);  HtmlLink(String href, String condition); String getHref(); void setHref(String href); @Override StringBuilder toHtml();  }