1 8 package org.codehaus.spice.jndikit.memory.test; 9 10 import javax.naming.NamingException ; 11 import javax.naming.OperationNotSupportedException ; 12 13 import junit.framework.AssertionFailedError; 14 import org.codehaus.spice.jndikit.StandardNamespace; 15 import org.codehaus.spice.jndikit.test.AbstractContextTestCase; 16 17 23 public abstract class AbstractMemoryContextTestCase 24 extends AbstractContextTestCase 25 { 26 27 public void testGetNameInNamespace() throws AssertionFailedError 28 { 29 try 30 { 31 String name = m_context.getNameInNamespace(); 32 fail( "Expected getNameInNamespace to throw OperationNotSupportedException but returned " 33 + name ); 34 } 35 catch( final OperationNotSupportedException expected ) 36 { 37 } 38 catch( final NamingException ne ) 39 { 40 throw new AssertionFailedError( ne.getMessage() ); 41 } 42 } 43 } 44 | Popular Tags |