KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > i18n > test > DefaultBundleLoaderTestCase


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.i18n.test;
9
10 import java.util.Map JavaDoc;
11 import java.util.HashMap JavaDoc;
12
13 import org.apache.avalon.framework.configuration.Configuration;
14
15 import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
16 import org.apache.avalon.excalibur.i18n.BundleInfo;
17 import org.apache.avalon.excalibur.i18n.XmlBundle;
18 import org.apache.avalon.excalibur.i18n.BundleSelector;
19
20 /**
21  * @author <a HREF="mailto:neeme@apache.org">Neeme Praks</a>
22  * @version $Id: DefaultBundleLoaderTestCase.java,v 1.5 2001/12/11 09:53:35 jefft Exp $
23  */

24 public class DefaultBundleLoaderTestCase extends ExcaliburTestCase {
25
26     private BundleSelector bundleSelector;
27
28     public DefaultBundleLoaderTestCase( String JavaDoc name ) {
29         super(name);
30     }
31
32     public void setUp() throws Exception JavaDoc {
33         super.setUp();
34         this.bundleSelector = (BundleSelector) this.manager.lookup(BundleSelector.ROLE);
35     }
36
37     public void tearDown() throws Exception JavaDoc {
38         manager.release(this.bundleSelector);
39         this.bundleSelector = null;
40         super.tearDown();
41     }
42
43     public void testLoading() throws Exception JavaDoc {
44         this.bundleSelector.select("ee", "uu");
45     }
46
47     public static void main(String JavaDoc[] args) {
48         ExcaliburTestCase test = new DefaultBundleLoaderTestCase("test");
49         test.run();
50     }
51 }
52
Popular Tags