KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > arooa > reflect > DefaultRegistryLookupTest


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.arooa.reflect;
5
6 import java.util.HashMap JavaDoc;
7
8 import junit.framework.TestCase;
9
10 import org.oddjob.arooa.registry.ComponentRegistry;
11
12 /**
13  *
14  */

15 public class DefaultRegistryLookupTest extends TestCase {
16
17     public void test1() {
18         ComponentRegistry cr = new ComponentRegistry();
19         cr.register("foo", new HashMap JavaDoc());
20         
21         RegistryLookup lookup = new DefaultRegistryLookup(cr);
22         lookup.setProperty("foo.greeting", new String JavaDoc("Hello World!"));
23         assertEquals("Hello World!", lookup.getProperty("foo.greeting"));
24     }
25 }
26
Popular Tags