Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2008-11-12 15:28:57 +0000
committerChris Goldthorpe2008-11-12 15:28:57 +0000
commit84ee48b87fee1a0076f766a2e566166055988138 (patch)
treeb8a5d0fe36fd29fd95276c78ff6163b46df55078 /org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other
parentaf5bf7a9108bc5ecc062925c1ffb9dd4b6295aa4 (diff)
downloadeclipse.platform.ua-84ee48b87fee1a0076f766a2e566166055988138.tar.gz
eclipse.platform.ua-84ee48b87fee1a0076f766a2e566166055988138.tar.xz
eclipse.platform.ua-84ee48b87fee1a0076f766a2e566166055988138.zip
Remove reference to SAXExeption
Diffstat (limited to 'org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java29
1 files changed, 11 insertions, 18 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
index 081a36ab2..dae79efde 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/EntityResolutionTest.java
@@ -11,7 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
@@ -19,12 +18,11 @@ import junit.framework.TestCase;
import org.eclipse.help.internal.entityresolver.LocalEntityResolver;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
public class EntityResolutionTest extends TestCase {
- public void resolve(String systemId, boolean isSupportedDtd) {
- try {
+ public void resolve(String systemId, boolean isSupportedDtd) throws Exception {
+
LocalEntityResolver resolver = new LocalEntityResolver();
InputSource is = resolver.resolveEntity("publicId", systemId);
Reader reader = is.getCharacterStream();
@@ -42,46 +40,41 @@ public class EntityResolutionTest extends TestCase {
} else {
assertTrue("Unsupported Entity did not return empty stream", read == -1);
}
- } catch (SAXException e) {
- fail("SAX Exception thrown");
- } catch (IOException e) {
- fail("IO Exception thrown");
- }
}
- public void testXhtml1() {
+ public void testXhtml1() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", true);
}
- public void testFramset() {
+ public void testFramset() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd", true);
}
- public void testFlat() {
+ public void testFlat() throws Exception {
resolve("http://www.w3.org/TR/xhtml11/DTD/xhtml11-flat.dtd", true);
}
- public void testStrict() {
+ public void testStrict() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd", true);
}
- public void testTransitional() {
+ public void testTransitional() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", true);
}
- public void testLat1() {
+ public void testLat1() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent", true);
}
- public void testSpecial() {
+ public void testSpecial() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent", true);
}
- public void testResolveSymbol() {
+ public void testResolveSymbol() throws Exception {
resolve("http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent", true);
}
- public void testUnsupportedDtds() throws SAXException, IOException {
+ public void testUnsupportedDtds() throws Exception {
resolve("xyz", false);
resolve("", false);
resolve("http://www.w3.org/TR/xhtml2/DTD/xhtml2-transitional.dtd", false);

Back to the top