1 package org.sapia.resource; 2 3 import junit.framework.TestCase; 4 5 public class ClasspathResourceHandlerTest extends TestCase { 6 7 public ClasspathResourceHandlerTest(String arg0) { 8 super(arg0); 9 } 10 11 public void testAccepts(){ 12 ClasspathResourceHandler handler = new ClasspathResourceHandler(); 13 assertTrue(handler.accepts("test/file.xml")); 14 assertTrue(handler.accepts("resource:/test/file.xml")); 15 assertTrue(handler.accepts("resource:test/file.xml")); 16 assertTrue(!handler.accepts("file:test/file.xml")); 17 } 18 19 public void testGetResource() throws Exception { 20 ClasspathResourceHandler handler = new ClasspathResourceHandler(); 21 handler.getResourceObject("org/sapia/resource/testUrlResource.txt"); 22 } 23 24 } 25 | Popular Tags |