1 22 package org.objectweb.petals.kernel.registry.jndi; 23 24 import javax.naming.CompositeName ; 25 import javax.naming.InvalidNameException ; 26 import javax.naming.NamingException ; 27 28 import junit.framework.TestCase; 29 30 35 public class JNDINameParserTest extends TestCase { 36 37 public void testParse() throws InvalidNameException , NamingException { 38 JNDINameParser jndiNameParser = new JNDINameParser(); 39 assertEquals(jndiNameParser.parse("test"), new CompositeName ("test")); 40 } 41 42 public void testEquals() { 43 JNDINameParser jndiNameParser = new JNDINameParser(); 44 JNDINameParser jndiNameParser1 = new JNDINameParser(); 45 assertTrue(jndiNameParser.equals(jndiNameParser1)); 46 } 47 48 public void testEquals1() { 49 JNDINameParser jndiNameParser = new JNDINameParser(); 50 assertFalse(jndiNameParser.equals("test")); 51 } 52 53 } 54 | Popular Tags |