Package org.apache.myfaces.test.mock.resource

Examples of org.apache.myfaces.test.mock.resource.MockSimpleResourceHandler


        assertTrue(stream.read() != -1);
    }

    public void testCreateResource() throws Exception
    {
        ResourceHandler handler = new MockSimpleResourceHandler(_documentRoot);
        Resource resource = handler.createResource("testfile.js", "testlib");
        assertNotNull("resource could not be created", resource);
        assertTrue(resource.getURL().toString().endsWith(
                "org/apache/myfaces/test/mock/resources/testlib/testfile.js"));
    }
View Full Code Here


                "org/apache/myfaces/test/mock/resources/testlib/testfile.js"));
    }

    public void testResourceHandler() throws Exception
    {
        ResourceHandler handler = new MockSimpleResourceHandler(_documentRoot);

        assertTrue(handler.libraryExists("testlib"));
        assertFalse(handler.libraryExists("notexistinglib"));

        assertEquals("javax.faces.resource.Script", handler
                .getRendererTypeForResourceName("testfile.js"));
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.test.mock.resource.MockSimpleResourceHandler

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.