You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by db...@apache.org on 2004/09/21 09:31:30 UTC

svn commit: rev 46970 - geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo

Author: dblevins
Date: Tue Sep 21 00:31:29 2004
New Revision: 46970

Modified:
   geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo/GeronimoContextTest.java
Log:
Added test to lookup Context objects from compound names



Modified: geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo/GeronimoContextTest.java
==============================================================================
--- geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo/GeronimoContextTest.java	(original)
+++ geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo/GeronimoContextTest.java	Tue Sep 21 00:31:29 2004
@@ -18,6 +18,7 @@
 package org.apache.geronimo.naming.geronimo;
 
 import javax.naming.NamingException;
+import javax.naming.Context;
 
 import junit.framework.TestCase;
 import org.apache.geronimo.naming.geronimo.GeronimoContext;
@@ -42,6 +43,12 @@
         assertEquals(context.lookup("one"), "one");
         assertEquals(context.lookup("this/is/a/compound/name"), "two");
         assertEquals(context.lookup("this/is/another/compound/name"), "three");
+    }
+
+    public void testLookupSubContext() throws Exception {
+        Context context = (Context) this.context.lookup("this/is");
+        assertEquals(context.lookup("a/compound/name"), "two");
+        assertEquals(context.lookup("another/compound/name"), "three");
     }
 
     public void testUnbind() throws Exception {