Methods Summary |
---|
protected void | setUp()
super.setUp();
try {
factory = new DOMDocumentBuilderFactory(DOMDocumentBuilderFactory
.getConfiguration1());
builder = factory.getBuilder();
} catch (Exception e) {
fail("Unexpected exception" + e.getMessage());
}
|
protected void | tearDown()
factory = null;
builder = null;
super.tearDown();
|
public void | testHasAttribute1()Runs the test case.
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staff", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(4);
state = testNode.hasAttribute("domestic");
assertFalse("throw_False", state);
|
public void | testHasAttribute3()
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staff", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(0);
state = testNode.hasAttribute("nomatch");
assertFalse("throw_False", state);
|
public void | testHasAttribute4()
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staffNS", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(0);
state = testNode.hasAttribute("dmstc:domestic");
assertTrue("hasDomesticAttr", state);
|