geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: rev 46970 - geronimo/trunk/modules/naming/src/test/org/apache/geronimo/naming/geronimo
Date Tue, 21 Sep 2004 07:31:30 GMT
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 {

Mime
View raw message