Methods Summary |
---|
protected void | setUp()
super.setUp();
try {
factory = new DOMDocumentBuilderFactory(DOMDocumentBuilderFactory
.getConfiguration2());
builder = factory.getBuilder();
} catch (Exception e) {
fail("Unexpected exception" + e.getMessage());
}
|
protected void | tearDown()
factory = null;
builder = null;
super.tearDown();
|
public void | testHasAttributeNS1()Runs the test case.
String localName = "nomatch";
String namespaceURI = "http://www.usa.com";
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staffNS", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(0);
state = testNode.hasAttributeNS(namespaceURI, localName);
assertFalse("throw_False", state);
|
public void | testHasAttributeNS2()
String localName = "domestic";
String namespaceURI = "http://www.nomatch.com";
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staffNS", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(0);
state = testNode.hasAttributeNS(namespaceURI, localName);
assertFalse("throw_False", state);
|
public void | testHasAttributeNS3()
String localName = "blank";
String namespaceURI = "http://www.nist.gov";
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staffNS", builder);
elementList = doc.getElementsByTagName("emp:address");
testNode = (Element) elementList.item(0);
assertNotNull("empAddrNotNull", testNode);
state = testNode.hasAttributeNS(namespaceURI, localName);
assertFalse("throw_False", state);
|
public void | testHasAttributeNS5()
String localName = "domestic";
String namespaceURI = "http://www.usa.com";
Document doc;
NodeList elementList;
Element testNode;
boolean state;
doc = (Document) load("staffNS", builder);
elementList = doc.getElementsByTagName("address");
testNode = (Element) elementList.item(0);
state = testNode.hasAttributeNS(namespaceURI, localName);
assertTrue("hasAttribute", state);
|