@Test public void should_generate_link_tag_with_href() { script = new HtmlScript("mySrc"); assertThat(script.toHtml().toString()).isEqualTo("<script src=\"mySrc\"></script>"); }
@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; }
HtmlScript 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; } }
HtmlScript 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; } HtmlScript();  HtmlScript(String src);  HtmlScript(String src, String condition); }
HtmlScript 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; } HtmlScript();  HtmlScript(String src);  HtmlScript(String src, String condition); String getSrc(); void setSrc(String src); String getCondition(); void setCondition(String condition); @Override StringBuilder toHtml(); }
HtmlScript 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; } HtmlScript();  HtmlScript(String src);  HtmlScript(String src, String condition); String getSrc(); void setSrc(String src); String getCondition(); void setCondition(String condition); @Override StringBuilder toHtml();  }