File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -822,7 +822,8 @@ Authors:
822822 <batchtest fork =" yes" todir =" test-reports" >
823823 <fileset dir =" ${ build.dir } /classes" >
824824 <include name =" dom/DTest.class" />
825- <include name =" dom/dom3/Test.class" />
825+ <include name =" dom/dom3/Test.class" />
826+ <include name =" dom/registry/Test.class" />
826827 <include name =" dom/traversal/*Test.class" />
827828 <include name =" dom/range/TestCompare.class" />
828829 <include name =" idc/IDConstraintTests.class" />
@@ -968,12 +969,6 @@ Authors:
968969 classpathref =" test.classpath"
969970 failOnError =" yes" >
970971 </java >
971- <echo message =" Running dom.registry.Test..." />
972- <java fork =" yes"
973- classname =" dom.registry.Test"
974- classpathref =" test.classpath"
975- failOnError =" yes" >
976- </java >
977972
978973 </target >
979974
Original file line number Diff line number Diff line change 2323import org .w3c .dom .DOMImplementation ;
2424import org .w3c .dom .bootstrap .DOMImplementationRegistry ;
2525
26- import dom . util . Assertion ;
26+ import junit . framework . TestCase ;
2727
28- public class Test {
28+ public class Test extends TestCase {
2929
30- public static void main (String argv [])
31- {
32-
30+ public void testRegistry ()
31+ {
3332 System .out .println ("Running dom.registry.Test..." );
3433 // set DOMImplementationSource
3534 System .setProperty (DOMImplementationRegistry .PROPERTY ,
@@ -39,30 +38,30 @@ public static void main(String argv[])
3938 DOMImplementationRegistry registry = null ;
4039 try {
4140 registry = DOMImplementationRegistry .newInstance ();
42- Assertion . verify ( registry != null );
41+ assertNotNull ( " registry should not be null" , registry );
4342 } catch (Exception e ) {
44- e . printStackTrace ( );
43+ fail ( "Unexpected exception: " + e . getMessage () );
4544 }
4645
4746 try {
4847 DOMImplementation i = registry .getDOMImplementation ("XML" );
4948
50- Assertion . verify ( i ==
49+ assertSame ( i ,
5150 CoreDOMImplementationImpl .getDOMImplementation ());
5251
5352 } catch (Exception e ) {
54- e . printStackTrace ( );
53+ fail ( "Unexpected exception: " + e . getMessage () );
5554 }
5655
5756 try {
5857 DOMImplementation i =
5958 registry .getDOMImplementation ("XML MutationEvents" );
6059
61- Assertion . verify ( i ==
60+ assertSame ( i ,
6261 DOMImplementationImpl .getDOMImplementation ());
6362
6463 } catch (Exception e ) {
65- e . printStackTrace ( );
64+ fail ( "Unexpected exception: " + e . getMessage () );
6665 }
6766 }
6867}
You can’t perform that action at this time.
0 commit comments