diff options
author | Mehdi Houshmand <mehdi@apache.org> | 2012-06-14 14:05:16 +0000 |
---|---|---|
committer | Mehdi Houshmand <mehdi@apache.org> | 2012-06-14 14:05:16 +0000 |
commit | d17d05e36c068e0ce4b71d24ba764d80c26a9155 (patch) | |
tree | b2f6880e73f27357cc3341740bc1d18ecf6d6e5a /test/java/org | |
parent | 24664f14599a17792b0704ae352702407cb5c0e0 (diff) | |
download | xmlgraphics-fop-d17d05e36c068e0ce4b71d24ba764d80c26a9155.tar.gz xmlgraphics-fop-d17d05e36c068e0ce4b71d24ba764d80c26a9155.zip |
Removed URI resolving class that are no longer needed and handled data URIs
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_URI_Unification@1350248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org')
5 files changed, 3 insertions, 86 deletions
diff --git a/test/java/org/apache/fop/apps/FopConfParserTestCase.java b/test/java/org/apache/fop/apps/FopConfParserTestCase.java index ca9dd1440..2fe939f76 100644 --- a/test/java/org/apache/fop/apps/FopConfParserTestCase.java +++ b/test/java/org/apache/fop/apps/FopConfParserTestCase.java @@ -87,14 +87,6 @@ public class FopConfParserTestCase { } @Test - public void testHyphenationBaseURI() { - String hyphBaseURI = "./test/base/uri/"; - builder.setHyphenationBaseURI(hyphBaseURI); - assertEquals(baseURI.resolve(hyphBaseURI), - URI.create(buildFactory().getHyphenBaseURI())); - } - - @Test public void testSourceResolution() { float srcRes = 123.456f; builder.setSourceResolution(srcRes); diff --git a/test/java/org/apache/fop/config/FOURIResolverTestCase.java b/test/java/org/apache/fop/config/FOURIResolverTestCase.java deleted file mode 100644 index 0358638b3..000000000 --- a/test/java/org/apache/fop/config/FOURIResolverTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* $Id$ */ - -package org.apache.fop.config; - -import static org.junit.Assert.fail; - -import java.net.MalformedURLException; - -import org.apache.fop.apps.io.FOURIResolver; -import org.junit.Test; - -/** - * This tests some aspects of the {@link FOURIResolver} class. - */ -public class FOURIResolverTestCase { - - /** - * Checks the {@link FOURIResolver#checkBaseURL(String)} method. - * @throws Exception if an error occurs - */ - @Test - public void testCheckBaseURI() throws Exception { - FOURIResolver resolver = new FOURIResolver(true); - System.out.println(resolver.checkBaseURL("./test/config")); - System.out.println(resolver.checkBaseURL("file:test/config")); - System.out.println(resolver.checkBaseURL("fantasy:myconfig")); - System.out.println(resolver.checkBaseURL("file:test\\config\\")); - try { - resolver.checkBaseURL("./doesnotexist"); - fail("Expected an exception for a inexistent base directory"); - } catch (MalformedURLException mfue) { - //expected - } - try { - resolver.checkBaseURL("file:doesnotexist"); - fail("Expected an exception for a inexistent base URI"); - } catch (MalformedURLException mfue) { - //expected - } - } - -} diff --git a/test/java/org/apache/fop/config/UserConfigTestSuite.java b/test/java/org/apache/fop/config/UserConfigTestSuite.java index 91329f6ec..9cb5c4270 100644 --- a/test/java/org/apache/fop/config/UserConfigTestSuite.java +++ b/test/java/org/apache/fop/config/UserConfigTestSuite.java @@ -34,8 +34,7 @@ import org.junit.runners.Suite.SuiteClasses; FontMetricsUrlMalformedTestCase.class, FontsDirectoryRecursiveTestCase.class, FontsAutoDetectTestCase.class, - FontsSubstitutionTestCase.class, - FOURIResolverTestCase.class + FontsSubstitutionTestCase.class }) public class UserConfigTestSuite { } diff --git a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java index c45b4d1f4..7e03b2e8b 100644 --- a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java +++ b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java @@ -28,7 +28,6 @@ import java.util.Set; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.URIResolver; import org.junit.BeforeClass; import org.junit.Test; @@ -52,7 +51,6 @@ import org.apache.fop.apps.FopFactoryConfig; import org.apache.fop.apps.io.ResourceResolver; import org.apache.fop.fonts.FontManager; import org.apache.fop.fotreetest.ext.TestElementMapping; -import org.apache.fop.hyphenation.HyphenationTreeResolver; import org.apache.fop.layoutengine.LayoutEngineTestUtils; import org.apache.fop.layoutengine.TestFilesConfiguration; import org.apache.fop.layoutmgr.LayoutManagerMaker; @@ -209,22 +207,10 @@ public class FOTreeTestCase { return delegate.getNewURIResolver(); } - public URIResolver getURIResolver() { - return delegate.getURIResolver(); - } - public URI getBaseURI() { return delegate.getBaseURI(); } - public URI getHyphenationBaseURI() { - return delegate.getHyphenationBaseURI(); - } - - public HyphenationTreeResolver getHyphenationTreeResolver() { - return delegate.getHyphenationTreeResolver(); - } - public boolean validateStrictly() { return delegate.validateStrictly(); } diff --git a/test/java/org/apache/fop/util/ColorUtilTestCase.java b/test/java/org/apache/fop/util/ColorUtilTestCase.java index 6271b18de..6e65004a3 100644 --- a/test/java/org/apache/fop/util/ColorUtilTestCase.java +++ b/test/java/org/apache/fop/util/ColorUtilTestCase.java @@ -44,7 +44,6 @@ import static org.junit.Assert.assertTrue; */ public class ColorUtilTestCase { private FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI()); - private final String thisDirectory = "file:" + new File("./").getAbsolutePath(); /** * Test serialization to String. @@ -131,7 +130,7 @@ public class ColorUtilTestCase { FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI()); URI sRGBLoc = new URI("src/java/org/apache/fop/pdf/sRGB%20Color%20Space%20Profile.icm"); ColorSpace cs = fopFactory.getColorSpaceCache().get( - "sRGBAlt", thisDirectory, sRGBLoc.toASCIIString(), RenderingIntent.AUTO); + "sRGBAlt", sRGBLoc.toASCIIString(), RenderingIntent.AUTO); assertNotNull("Color profile not found", cs); FOUserAgent ua = fopFactory.newFOUserAgent(); @@ -300,7 +299,7 @@ public class ColorUtilTestCase { FopFactory fopFactory = FopFactory.newInstance(new File("./").toURI()); URI ncpLoc = new URI("test/resources/color/ncp-example.icc"); ColorSpace cs = fopFactory.getColorSpaceCache().get( - "NCP", thisDirectory, ncpLoc.toASCIIString(), RenderingIntent.AUTO); + "NCP", ncpLoc.toASCIIString(), RenderingIntent.AUTO); assertNotNull("Color profile not found", cs); FOUserAgent ua = fopFactory.newFOUserAgent(); |