diff options
Diffstat (limited to 'test/java')
7 files changed, 22 insertions, 22 deletions
diff --git a/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java b/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java index 3283d4690..440b16abb 100644 --- a/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java +++ b/test/java/org/apache/fop/apps/io/URIResolverWrapperTestCase.java @@ -85,8 +85,8 @@ public class URIResolverWrapperTestCase { @Test public void getBaseURI() throws URISyntaxException { - assertEquals(URIResolverWrapper.getBaseURI("x/y/z/"), new URI("x/y/z/")); - assertEquals(URIResolverWrapper.getBaseURI("x/y/z"), new URI("x/y/z/")); + assertEquals(InternalResourceResolver.getBaseURI("x/y/z/"), new URI("x/y/z/")); + assertEquals(InternalResourceResolver.getBaseURI("x/y/z"), new URI("x/y/z/")); } @Test @@ -94,19 +94,19 @@ public class URIResolverWrapperTestCase { String[] uris = new String[] {".", "path/to/resource", "path\\to\\resource", "bad resource name"}; for (String uri : uris) { - assertEquals(URIResolverWrapper.cleanURI(uri), cleanURI(uri)); + assertEquals(InternalResourceResolver.cleanURI(uri), cleanURI(uri)); } - assertNull(URIResolverWrapper.cleanURI(null)); + assertNull(InternalResourceResolver.cleanURI(null)); } private void test(String uriStr, URI uri, URI expected) throws IOException, URISyntaxException { ResourceResolver resolver = mock(ResourceResolver.class); - URIResolverWrapper sut = new URIResolverWrapper(base, resolver); - sut.resolveIn(uriStr); + InternalResourceResolver sut = new InternalResourceResolver(base, resolver); + sut.getResource(uriStr); verify(resolver).getResource(eq(expected)); resolver = mock(ResourceResolver.class); - sut = new URIResolverWrapper(base, resolver); - sut.resolveIn(uri); + sut = new InternalResourceResolver(base, resolver); + sut.getResource(uri); verify(resolver).getResource(eq(expected)); } diff --git a/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java b/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java index 8ccaa24d4..1ac79e353 100644 --- a/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java +++ b/test/java/org/apache/fop/config/FontsSubstitutionTestCase.java @@ -66,7 +66,7 @@ public class FontsSubstitutionTestCase extends BaseConstructiveUserConfigTest { FontManager fontManager = ua.getFontManager(); FontCollection[] fontCollections = new FontCollection[] { new Base14FontCollection(fontManager.isBase14KerningEnabled()), - new CustomFontCollection(fontManager.getURIResolver(), renderer.getFontList(), + new CustomFontCollection(fontManager.getResourceResolver(), renderer.getFontList(), ua.isComplexScriptFeaturesEnabled()) }; fontManager.setup(fontInfo, fontCollections); diff --git a/test/java/org/apache/fop/fonts/DejaVuLGCSerifTestCase.java b/test/java/org/apache/fop/fonts/DejaVuLGCSerifTestCase.java index 761333183..7a427c548 100644 --- a/test/java/org/apache/fop/fonts/DejaVuLGCSerifTestCase.java +++ b/test/java/org/apache/fop/fonts/DejaVuLGCSerifTestCase.java @@ -25,7 +25,7 @@ import org.junit.Before; import org.junit.Test; import org.apache.fop.apps.io.ResourceResolverFactory; -import org.apache.fop.apps.io.URIResolverWrapper; +import org.apache.fop.apps.io.InternalResourceResolver; import static org.junit.Assert.assertEquals; @@ -34,7 +34,7 @@ import static org.junit.Assert.assertEquals; */ public class DejaVuLGCSerifTestCase { - private URIResolverWrapper resolver = new URIResolverWrapper(new File(".").toURI(), + private InternalResourceResolver resolver = new InternalResourceResolver(new File(".").toURI(), ResourceResolverFactory.createDefaultResourceResolver()); private CustomFont font; diff --git a/test/java/org/apache/fop/fonts/FontManagerConfiguratorTestCase.java b/test/java/org/apache/fop/fonts/FontManagerConfiguratorTestCase.java index 990326a72..073743c13 100644 --- a/test/java/org/apache/fop/fonts/FontManagerConfiguratorTestCase.java +++ b/test/java/org/apache/fop/fonts/FontManagerConfiguratorTestCase.java @@ -71,14 +71,14 @@ public class FontManagerConfiguratorTestCase { String actualBase = "../../resources/fonts/ttf/"; FontManager fontManager = setBaseAndGetManager(actualBase); URI expectedURI = baseURI.resolve(actualBase); - assertEquals(expectedURI, fontManager.getURIResolver().getBaseURI()); + assertEquals(expectedURI, fontManager.getResourceResolver().getBaseURI()); } @Test public void currentRelativeFontBaseTest() { String actualBase = "."; FontManager fontManager = setBaseAndGetManager(actualBase); - assertEquals(baseURI, fontManager.getURIResolver().getBaseURI()); + assertEquals(baseURI, fontManager.getResourceResolver().getBaseURI()); } /** @@ -93,7 +93,7 @@ public class FontManagerConfiguratorTestCase { String actualBase = "non-existing-dir/"; FontManager fontManager = setBaseAndGetManager(actualBase); assertEquals(baseURI.resolve("non-existing-dir/"), - fontManager.getURIResolver().getBaseURI()); + fontManager.getResourceResolver().getBaseURI()); } /** @@ -105,13 +105,13 @@ public class FontManagerConfiguratorTestCase { builder.setBaseURI(actualBase); FontManager fontManager = getManager(); assertEquals(baseURI.resolve(actualBase), - fontManager.getURIResolver().getBaseURI()); + fontManager.getResourceResolver().getBaseURI()); } @Test public void absoluteBaseURI() { String absoluteBase = "test:///absolute/"; FontManager fontManager = setBaseAndGetManager(absoluteBase); - assertEquals(URI.create(absoluteBase), fontManager.getURIResolver().getBaseURI()); + assertEquals(URI.create(absoluteBase), fontManager.getResourceResolver().getBaseURI()); } } diff --git a/test/java/org/apache/fop/fonts/truetype/TTFFontLoaderTestCase.java b/test/java/org/apache/fop/fonts/truetype/TTFFontLoaderTestCase.java index edd65f108..f80ce7521 100644 --- a/test/java/org/apache/fop/fonts/truetype/TTFFontLoaderTestCase.java +++ b/test/java/org/apache/fop/fonts/truetype/TTFFontLoaderTestCase.java @@ -26,7 +26,7 @@ import java.net.URI; import org.junit.Test; import org.apache.fop.apps.io.ResourceResolverFactory; -import org.apache.fop.apps.io.URIResolverWrapper; +import org.apache.fop.apps.io.InternalResourceResolver; import org.apache.fop.fonts.EncodingMode; import static org.junit.Assert.assertFalse; @@ -42,7 +42,7 @@ public class TTFFontLoaderTestCase { boolean useComplexScriptFeatures = false; File file = new File("test/resources/fonts/ttf/DejaVuLGCSerif.ttf"); URI absoluteFilePath = file.toURI(); - URIResolverWrapper resolver = ResourceResolverFactory.createDefaultWrapper(); + InternalResourceResolver resolver = ResourceResolverFactory.createDefaultWrapper(); String fontName = "Deja Vu"; boolean embedded = false; boolean useKerning = true; diff --git a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java index 7e03b2e8b..b03e35971 100644 --- a/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java +++ b/test/java/org/apache/fop/fotreetest/FOTreeTestCase.java @@ -203,8 +203,8 @@ public class FOTreeTestCase { return delegate.getLayoutManagerMakerOverride(); } - public ResourceResolver getNewURIResolver() { - return delegate.getNewURIResolver(); + public ResourceResolver getResourceResolver() { + return delegate.getResourceResolver(); } public URI getBaseURI() { diff --git a/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java b/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java index 80cbddd2d..a781c3c8a 100644 --- a/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java +++ b/test/java/org/apache/fop/pdf/PDFFactoryTestCase.java @@ -22,7 +22,7 @@ package org.apache.fop.pdf; import org.junit.Test; import org.apache.fop.apps.io.ResourceResolverFactory; -import org.apache.fop.apps.io.URIResolverWrapper; +import org.apache.fop.apps.io.InternalResourceResolver; import org.apache.fop.fonts.CIDSubset; import org.apache.fop.fonts.MultiByteFont; @@ -40,7 +40,7 @@ public class PDFFactoryTestCase { @Test public void testSubsetFontNamePrefix() { class MockedFont extends MultiByteFont { - public MockedFont(URIResolverWrapper resolver) { + public MockedFont(InternalResourceResolver resolver) { super(resolver); } |