01: package org.objectweb.celtix.common.i18n;
02:
03: import java.util.ResourceBundle;
04:
05: import junit.framework.TestCase;
06:
07: public class BundleUtilsTest extends TestCase {
08: public void testGetBundleName() throws Exception {
09: assertEquals("unexpected resource bundle name",
10: "org.objectweb.celtix.common.i18n.Messages",
11: BundleUtils.getBundleName(getClass()));
12: }
13:
14: public void testGetBundle() throws Exception {
15: ResourceBundle bundle = BundleUtils.getBundle(getClass());
16: assertNotNull("expected resource bundle", bundle);
17: assertEquals("unexpected resource", "localized message", bundle
18: .getString("I18N_MSG"));
19:
20: }
21: }
|