KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > spice > jndikit > rmi > test > RMIContextDefaultNamespaceTestCase


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

8 package org.codehaus.spice.jndikit.rmi.test;
9
10 import java.util.Hashtable JavaDoc;
11 import javax.naming.NamingException JavaDoc;
12
13 import org.codehaus.spice.jndikit.DefaultNamespace;
14 import org.codehaus.spice.jndikit.Namespace;
15 import org.codehaus.spice.jndikit.rmi.RMIInitialContextFactory;
16 import org.codehaus.spice.jndikit.test.TestObjectFactory;
17 import org.codehaus.spice.jndikit.test.TestStateFactory;
18
19 /**
20  * Unit test for RMI context, using the {@link DefaultNamespace}.
21  *
22  * @author Tim Anderson
23  * @version $Revision: 1.1 $
24  */

25 public class RMIContextDefaultNamespaceTestCase
26     extends AbstractRMIContextTestCase
27 {
28
29     public RMIContextDefaultNamespaceTestCase()
30     {
31         super( new DefaultNamespaceICF() );
32     }
33
34     static class DefaultNamespaceICF
35         extends RMIInitialContextFactory
36     {
37
38         protected Namespace newNamespace( final Hashtable JavaDoc environment )
39             throws NamingException JavaDoc
40         {
41             final DefaultNamespace namespace = ( DefaultNamespace ) super.newNamespace(
42                 environment );
43             namespace.addObjectFactory( new TestObjectFactory() );
44             namespace.addStateFactory( new TestStateFactory() );
45             return namespace;
46         }
47     }
48 }
49
Popular Tags