KickJava   Java API By Example, From Geeks To Geeks.

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


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 javax.naming.Context JavaDoc;
11
12 import org.codehaus.spice.jndikit.DefaultNameParser;
13 import org.codehaus.spice.jndikit.DefaultNamespace;
14 import org.codehaus.spice.jndikit.memory.MemoryContext;
15 import org.codehaus.spice.jndikit.test.TestObjectFactory;
16 import org.codehaus.spice.jndikit.test.TestStateFactory;
17
18 /**
19  * Unit test for Memory context, using the {@link DefaultNamespace}.
20  *
21  * @author Tim Anderson
22  * @version $Revision: 1.1 $
23  */

24 public class MemoryContextDefaultNamespaceTestCase
25     extends AbstractMemoryContextTestCase
26 {
27
28     protected Context JavaDoc getRoot() throws Exception JavaDoc
29     {
30         final DefaultNameParser parser = new DefaultNameParser();
31         final DefaultNamespace namespace = new DefaultNamespace( parser );
32         namespace.addObjectFactory( new TestObjectFactory() );
33         namespace.addStateFactory( new TestStateFactory() );
34         return new MemoryContext( namespace, null, null );
35     }
36 }
37
Popular Tags