Public Methods | |
| elementreplaceexistingattributegevalue (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the last child of the third employee and add a new attribute node. The new attribute node is "street", which is already present in this Element. The method should return the existing Attr node(old "street" Attr). This test uses the "createAttribute(name)" method from the Document interface.
Definition at line 48 of file elementreplaceexistingattributegevalue.java.
|
|
Definition at line 50 of file elementreplaceexistingattributegevalue.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 72 of file elementreplaceexistingattributegevalue.java.
00072 {
00073 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementreplaceexistingattributegevalue";
00074 }
|
|
|
Definition at line 75 of file elementreplaceexistingattributegevalue.java. References DOMTestCase::doMain().
00075 {
00076 DOMTestCase.doMain(elementreplaceexistingattributegevalue.class,args);
00077 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file elementreplaceexistingattributegevalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Element testEmployee;
00060 Attr newAttribute;
00061 Attr streetAttr;
00062 String value;
00063 doc = load("staff");
00064 elementList = doc.getElementsByTagName("address");
00065 testEmployee = (Element)elementList.item(2);
00066 newAttribute = doc.createAttribute("street");
00067 streetAttr = testEmployee.setAttributeNode(newAttribute);
00068 value = streetAttr.getValue();
00069 assertEquals("elementReplaceExistingAttributeGeValueAssert","No",value);
00070
00071 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001