Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,10 @@ Authors:
<include name="schema/config/SurrogatePairLengthTest.class"/>
<include name="schema/config/UseGrammarPoolOnly_True_Test.class"/>
<include name="schema/config/UnparsedEntityCheckingTest.class"/>
-->
<include name="jaxp/JAXPSpecTest.class"/>
<include name="dom/ids/Test.class"/>
-->
<include name="dom/registry/Test.class"/>
<include name="jaxp/JAXPSpecTest.class"/>
<include name="dom/ids/Test.class"/>
</fileset>
</batchtest>

Expand Down Expand Up @@ -953,12 +954,6 @@ Authors:
classpathref="test.classpath"
failOnError="yes">
</java>
<echo message="Running dom.registry.Test..." />
<java fork="yes"
classname="dom.registry.Test"
classpathref="test.classpath"
failOnError="yes">
</java>
<echo message="Running dom.dom3.Test..." />
<java fork="yes"
classname="dom.dom3.Test"
Expand Down
21 changes: 10 additions & 11 deletions tests/dom/registry/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.bootstrap.DOMImplementationRegistry;

import dom.util.Assertion;
import junit.framework.TestCase;

public class Test {
public class Test extends TestCase {

public static void main(String argv[])
{

public void testRegistry()
{
System.out.println("Running dom.registry.Test...");
// set DOMImplementationSource
System.setProperty(DOMImplementationRegistry.PROPERTY,
Expand All @@ -39,30 +38,30 @@ public static void main(String argv[])
DOMImplementationRegistry registry = null;
try {
registry = DOMImplementationRegistry.newInstance();
Assertion.verify(registry != null);
assertNotNull("registry should not be null", registry);
} catch (Exception e) {
e.printStackTrace();
fail("Unexpected exception: " + e.getMessage());
}

try {
DOMImplementation i = registry.getDOMImplementation("XML");

Assertion.verify(i ==
assertSame(i,
CoreDOMImplementationImpl.getDOMImplementation());

} catch (Exception e) {
e.printStackTrace();
fail("Unexpected exception: " + e.getMessage());
}

try {
DOMImplementation i =
registry.getDOMImplementation("XML MutationEvents");

Assertion.verify(i ==
assertSame(i,
DOMImplementationImpl.getDOMImplementation());

} catch (Exception e) {
e.printStackTrace();
fail("Unexpected exception: " + e.getMessage());
}
}
}
Loading