Package org.grails.core.io

Examples of org.grails.core.io.StaticResourceLoader


*        Time: 3:49:27 PM
*/
public class StaticResourceLoaderTests extends TestCase {

    public void testGetResource() throws Exception {
        StaticResourceLoader srl = new StaticResourceLoader();
        srl.setBaseResource(new UrlResource("http://grails.org"));

        Resource r = srl.getResource("/Home");
        assertEquals("http://grails.org/Home", r.getURL().toString());
    }
View Full Code Here


        Resource r = srl.getResource("/Home");
        assertEquals("http://grails.org/Home", r.getURL().toString());
    }

    public void testIllegalState() {
        StaticResourceLoader srl = new StaticResourceLoader();

        try {
            srl.getResource("/foo");
            fail("Should have thrown IllegalStateException");
        } catch (IllegalStateException ise) {
            // expected
        }
    }
View Full Code Here

TOP

Related Classes of org.grails.core.io.StaticResourceLoader

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.