Package org.apache.fop.apps

Examples of org.apache.fop.apps.FOURIResolver


    /**
     * Checks the {@link FOURIResolver#checkBaseURL(String)} method.
     * @throws Exception if an error occurs
     */
    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
        }
    }
View Full Code Here


     * 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
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.apps.FOURIResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.