KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > spice > jndikit > memory > test > MemoryContextTestCase


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.memory.test;
9
10 import java.util.Hashtable JavaDoc;
11 import javax.naming.Context JavaDoc;
12
13 import org.codehaus.spice.jndikit.DefaultNameParser;
14 import org.codehaus.spice.jndikit.Namespace;
15 import org.codehaus.spice.jndikit.StandardNamespace;
16 import org.codehaus.spice.jndikit.memory.MemoryContext;
17 import org.codehaus.spice.jndikit.test.TestStateFactory;
18
19 /**
20  * Unit test for Memory context, using the {@link StandardNamespace}. ,
21  *
22  * @author Peter Donald
23  * @author Tim Anderson
24  * @version $Revision: 1.2 $
25  */

26 public class MemoryContextTestCase
27     extends AbstractMemoryContextTestCase
28 {
29
30     protected Context JavaDoc getRoot() throws Exception JavaDoc
31     {
32         final DefaultNameParser parser = new DefaultNameParser();
33         final Namespace namespace = new StandardNamespace( parser );
34
35         Hashtable JavaDoc environment = new Hashtable JavaDoc();
36         environment.put( Context.STATE_FACTORIES,
37                          TestStateFactory.class.getName() );
38
39         return new MemoryContext( namespace, environment, null );
40     }
41 }
42
Popular Tags