@Test public void isOrHasChild_notChild() { // Arrange Element a = Document.get().createAnchorElement(); // Act & Assert assertFalse(n.isOrHasChild(a)); }
@Test public void isOrHasChild_hasChild() { // Arrange Element a = Document.get().createAnchorElement(); Element div = Document.get().createDivElement(); div.appendChild(a); n.appendChild(div); // Act & Assert assertTrue(n.isOrHasChild(a)); }
@Test public void isOrHasChild_is() { // Act & Assert assertTrue(n.isOrHasChild(n)); }