Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

attrspecifiedvaluechanged Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 attrspecifiedvaluechanged (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "getSpecified()" method for an Attr node should return true if the value of the attribute is changed. Retrieve the attribute named "street" from the last child of of the THIRD employee and change its value to "Yes"(which is the default DTD value). This should cause the "getSpecified()" method to be true. This test uses the "setAttribute(name,value)" method from the Element interface and the "getNamedItem(name)" method from the NamedNodeMap interface.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-862529273

Definition at line 47 of file attrspecifiedvaluechanged.java.


Constructor & Destructor Documentation

attrspecifiedvaluechanged::attrspecifiedvaluechanged DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file attrspecifiedvaluechanged.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String attrspecifiedvaluechanged::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 72 of file attrspecifiedvaluechanged.java.

00072                                 {
00073       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrspecifiedvaluechanged";
00074    }

void attrspecifiedvaluechanged::main String    args[] [inline, static]
 

Definition at line 75 of file attrspecifiedvaluechanged.java.

References DOMTestCase::doMain().

00075                                           {
00076         DOMTestCase.doMain(attrspecifiedvaluechanged.class,args);
00077    }

void attrspecifiedvaluechanged::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file attrspecifiedvaluechanged.java.

References DOMTestCase::assertTrue(), and DOMTest::load().

00055                                                     {
00056       Document doc;
00057       NodeList addressList;
00058       Node testNode;
00059       NamedNodeMap attributes;
00060       Attr streetAttr;
00061       boolean state;
00062       doc = load("staff");
00063       addressList = doc.getElementsByTagName("address");
00064       testNode = addressList.item(2);
00065       ((Element)/*Node*/testNode).setAttribute("street","Yes");
00066       attributes = testNode.getAttributes();
00067       streetAttr = (Attr)attributes.getNamedItem("street");
00068       state = streetAttr.getSpecified();
00069       assertTrue("attrSpecifiedValueChangedAssert",state);
00070       
00071    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:32 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001