889890891892893894895896897898899
{ e.remove(); } } writer.end(); assertEquals(writer.toString(), "<?xml version=\"1.0\"?>\n" + "<ul><li>0</li><li>1</li><li>3</li></ul>"); } }
924925926927928929930931932933934
if (i != 2) { writer.write(String.valueOf(i)); } writer.end(); if (e.getChildren().isEmpty()) { e.remove(); }
932933934935936937938939940941942
5051525354555657585960
verify(); Element e = writer.getElement(); writer.write("link text"); writer.end(); assertEquals(writer.toString(), "<a href=\"/foo/bar.baz\">link text</a>"); } @Test
75767778798081828384
linkFixture.writeLink(writer, link); verify(); writer.write("link text"); writer.end(); assertEquals(writer.toString(), "<a href=\"/foo/bar.baz#wilma\">link text</a>"); } }
119120121122123124125126127128129
writer.element("select"); select.options(writer); writer.end(); assertEquals(writer.toString(), read("just_options.txt")); verify(); }
151152153154155156157158159160161
writer.element("select"); select.options(writer); writer.end(); assertEquals(writer.toString(), read("blank_label.txt")); verify(); }
182183184185186187188189190191192
writer.element("select"); select.options(writer); writer.end(); // fred will be selected, not barney, because the validation tracker // takes precendence. assertEquals(writer.toString(), read("current_selection_from_validation_tracker.txt"));
936937938939940941942943944945946
944945946947948949950951952953954
{ e.remove(); } } writer.end(); assertEquals(writer.toString(), "<?xml version=\"1.0\"?>\n" + "<ul><li>0</li><li>1</li><li>3</li></ul>"); }