1 8 package org.apache.avalon.excalibur.i18n.test; 9 10 import java.util.MissingResourceException ; 11 import org.apache.avalon.excalibur.i18n.ResourceManager; 12 import org.apache.avalon.excalibur.i18n.Resources; 13 import junit.framework.TestCase; 14 15 20 public class ResourceManagerTestCase 21 extends TestCase 22 { 23 public ResourceManagerTestCase( final String name ) 24 { 25 super( name ); 26 } 27 28 public void testClassResources() 29 { 30 try 31 { 32 final Resources resources = 33 ResourceManager.getClassResources( getClass() ); 34 35 resources.getBundle(); 36 } 37 catch ( final MissingResourceException mre ) 38 { 39 fail( "Unable to find class resource for class " + getClass() ); 40 } 41 } 42 43 public void testPackageResources() 44 { 45 try 46 { 47 final Resources resources = 48 ResourceManager.getPackageResources( getClass() ); 49 50 resources.getBundle(); 51 } 52 catch ( final MissingResourceException mre ) 53 { 54 fail( "Unable to find package resources for class " + getClass() ); 55 } 56 } 57 } 58 | Popular Tags |