Hamlet extends HamletImpl implements HamletSpec._Html { @Override public TABLE<TD<T>> table() { closeAttrs(); return table_(this, false); } Hamlet(PrintWriter out, int nestLevel, boolean wasInline); @Override TD<T> title(String value); @Override TD<T> style(String value); @Override TD<T> lang(String value); @Override TD<T> dir(Dir value); @Override TD<T> onclick(String value); @Override TD<T> ondblclick(String value); @Override TD<T> onmousedown(String value); @Override TD<T> onmouseup(String value); @Override TD<T> onmouseover(String value); @Override TD<T> onmousemove(String value); @Override TD<T> onmouseout(String value); @Override TD<T> onkeypress(String value); @Override TD<T> onkeydown(String value); @Override TD<T> onkeyup(String value); @Override TABLE<TD<T>> table(); @Override TABLE<TD<T>> table(String selector); @Override TD<T> address(String cdata); @Override ADDRESS<TD<T>> address(); @Override P<TD<T>> p(String selector); @Override P<TD<T>> p(); @Override TD<T> _(Class<? extends SubView> cls); @Override HR<TD<T>> hr(); @Override TD<T> hr(String selector); @Override DL<TD<T>> dl(String selector); @Override DL<TD<T>> dl(); @Override DIV<TD<T>> div(String selector); @Override DIV<TD<T>> div(); @Override BLOCKQUOTE<TD<T>> blockquote(); @Override BLOCKQUOTE<TD<T>> bq(); @Override TD<T> h1(String cdata); @Override H1<TD<T>> h1(); @Override TD<T> h1(String selector, String cdata); @Override TD<T> h2(String cdata); @Override H2<TD<T>> h2(); @Override TD<T> h2(String selector, String cdata); @Override H3<TD<T>> h3(); @Override TD<T> h3(String cdata); @Override TD<T> h3(String selector, String cdata); @Override H4<TD<T>> h4(); @Override TD<T> h4(String cdata); @Override TD<T> h4(String selector, String cdata); @Override H5<TD<T>> h5(); @Override TD<T> h5(String cdata); @Override TD<T> h5(String selector, String cdata); @Override H6<TD<T>> h6(); @Override TD<T> h6(String cdata); @Override TD<T> h6(String selector, String cdata); @Override UL<TD<T>> ul(); @Override UL<TD<T>> ul(String selector); @Override OL<TD<T>> ol(); @Override OL<TD<T>> ol(String selector); @Override PRE<TD<T>> pre(); @Override PRE<TD<T>> pre(String selector); @Override FORM<TD<T>> form(); @Override FORM<TD<T>> form(String selector); @Override FIELDSET<TD<T>> fieldset(); @Override FIELDSET<TD<T>> fieldset(String selector); @Override TD<T> _(Object... lines); @Override TD<T> _r(Object... lines); @Override B<TD<T>> b(); @Override TD<T> b(String cdata); @Override TD<T> b(String selector, String cdata); @Override I<TD<T>> i(); @Override TD<T> i(String cdata); @Override TD<T> i(String selector, String cdata); @Override SMALL<TD<T>> small(); @Override TD<T> small(String cdata); @Override TD<T> small(String selector, String cdata); @Override TD<T> em(String cdata); @Override EM<TD<T>> em(); @Override TD<T> em(String selector, String cdata); @Override STRONG<TD<T>> strong(); @Override TD<T> strong(String cdata); @Override TD<T> strong(String selector, String cdata); @Override DFN<TD<T>> dfn(); @Override TD<T> dfn(String cdata); @Override TD<T> dfn(String selector, String cdata); @Override CODE<TD<T>> code(); @Override TD<T> code(String cdata); @Override TD<T> code(String selector, String cdata); @Override TD<T> samp(String cdata); @Override SAMP<TD<T>> samp(); @Override TD<T> samp(String selector, String cdata); @Override KBD<TD<T>> kbd(); @Override TD<T> kbd(String cdata); @Override TD<T> kbd(String selector, String cdata); @Override VAR<TD<T>> var(); @Override TD<T> var(String cdata); @Override TD<T> var(String selector, String cdata); @Override CITE<TD<T>> cite(); @Override TD<T> cite(String cdata); @Override TD<T> cite(String selector, String cdata); @Override ABBR<TD<T>> abbr(); @Override TD<T> abbr(String cdata); @Override TD<T> abbr(String selector, String cdata); @Override A<TD<T>> a(); @Override A<TD<T>> a(String selector); @Override TD<T> a(String href, String anchorText); @Override TD<T> a(String selector, String href, String anchorText); @Override IMG<TD<T>> img(); @Override TD<T> img(String src); @Override OBJECT<TD<T>> object(); @Override OBJECT<TD<T>> object(String selector); @Override SUB<TD<T>> sub(); @Override TD<T> sub(String cdata); @Override TD<T> sub(String selector, String cdata); @Override SUP<TD<T>> sup(); @Override TD<T> sup(String cdata); @Override TD<T> sup(String selector, String cdata); @Override MAP<TD<T>> map(); @Override MAP<TD<T>> map(String selector); @Override TD<T> q(String cdata); @Override TD<T> q(String selector, String cdata); @Override Q<TD<T>> q(); @Override BR<TD<T>> br(); @Override TD<T> br(String selector); @Override BDO<TD<T>> bdo(); @Override TD<T> bdo(Dir dir, String cdata); @Override SPAN<TD<T>> span(); @Override TD<T> span(String cdata); @Override TD<T> span(String selector, String cdata); @Override SCRIPT<TD<T>> script(); @Override TD<T> script(String src); @Override INS<TD<T>> ins(); @Override TD<T> ins(String cdata); @Override DEL<TD<T>> del(); @Override TD<T> del(String cdata); @Override LABEL<TD<T>> label(); @Override TD<T> label(String forId, String cdata); @Override INPUT<TD<T>> input(String selector); @Override INPUT<TD<T>> input(); @Override SELECT<TD<T>> select(); @Override SELECT<TD<T>> select(String selector); @Override TEXTAREA<TD<T>> textarea(String selector); @Override TEXTAREA<TD<T>> textarea(); @Override TD<T> textarea(String selector, String cdata); @Override BUTTON<TD<T>> button(); @Override BUTTON<TD<T>> button(String selector); @Override TD<T> button(String selector, String cdata);  }
@Test public void testTable() { Hamlet h = newHamlet(). title("test table"). link("style.css"); TABLE t = h.table("#id"); for (int i = 0; i < 3; ++i) { t.tr().td("1").td("2")._(); } t._(); PrintWriter out = h.getWriter(); out.flush(); assertEquals(0, h.nestLevel); verify(out).print("<table"); verify(out).print("</table>"); verify(out, atLeast(1)).print("</td>"); verify(out, atLeast(1)).print("</tr>"); }