1 17 package org.apache.avalon.util.i18n.test; 18 19 import java.util.MissingResourceException ; 20 21 import junit.framework.TestCase; 22 23 import org.apache.avalon.util.i18n.ResourceManager; 24 import org.apache.avalon.util.i18n.Resources; 25 26 31 public class ResourceManagerTestCase 32 extends TestCase 33 { 34 public ResourceManagerTestCase( final String name ) 35 { 36 super( name ); 37 } 38 39 public void testClassResources() 40 { 41 try 42 { 43 final Resources resources = 44 ResourceManager.getClassResources( getClass() ); 45 46 resources.getBundle(); 47 } 48 catch( final MissingResourceException mre ) 49 { 50 fail( "Unable to find class resource for class " + getClass() ); 51 } 52 } 53 54 public void testPackageResources() 55 { 56 try 57 { 58 final Resources resources = 59 ResourceManager.getPackageResources( getClass() ); 60 61 resources.getBundle(); 62 } 63 catch( final MissingResourceException mre ) 64 { 65 fail( "Unable to find package resources for class " + getClass() ); 66 } 67 } 68 } 69 | Popular Tags |