directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923524 [7/7] - in /directory/shared/trunk: ldap-schema-loader/src/main/java/org/apache/directory/shared/ldap/schema/loader/ldif/ ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/ ldap-schema-manager/sr...
Date Tue, 16 Mar 2010 00:31:39 GMT
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/RdnTest.java Tue Mar 16 00:31:36 2010
@@ -33,9 +33,7 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.util.Iterator;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 
@@ -63,10 +61,10 @@ public class RdnTest
     /**
      * test an empty RDN
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnEmpty() throws InvalidNameException
+    public void testRdnEmpty() throws LdapException
     {
         assertEquals( "", new RDN( "" ).toString() );
     }
@@ -75,10 +73,10 @@ public class RdnTest
     /**
      * test a simple RDN : a = b
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnSimple() throws InvalidNameException
+    public void testRdnSimple() throws LdapException
     {
         assertEquals( "a=b", new RDN( "a = b" ).toString() );
     }
@@ -87,10 +85,10 @@ public class RdnTest
     /**
      * test a composite RDN : a = b, d = e
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnComposite() throws InvalidNameException
+    public void testRdnComposite() throws LdapException
     {
         assertEquals( "a=b+c=d", new RDN( "a = b + c = d" ).toString() );
     }
@@ -100,10 +98,10 @@ public class RdnTest
      * test a composite RDN with or without spaces: a=b, a =b, a= b, a = b, a =
      * b
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnCompositeWithSpace() throws InvalidNameException
+    public void testRdnCompositeWithSpace() throws LdapException
     {
         assertEquals( "a=b", new RDN( "a=b" ).toString() );
         assertEquals( "a=b", new RDN( " a=b" ).toString() );
@@ -127,10 +125,10 @@ public class RdnTest
     /**
      * test a simple RDN with differents separators : a = b + c = d
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnSimpleMultivaluedAttribute() throws InvalidNameException
+    public void testRdnSimpleMultivaluedAttribute() throws LdapException
     {
         String result = new RDN( "a = b + c = d" ).toString();
         assertEquals( "a=b+c=d", result );
@@ -141,10 +139,10 @@ public class RdnTest
      * test a composite RDN with differents separators : a=b+c=d, e=f + g=h +
      * i=j
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnCompositeMultivaluedAttribute() throws InvalidNameException
+    public void testRdnCompositeMultivaluedAttribute() throws LdapException
     {
         RDN rdn = new RDN( "a =b+c=d + e=f + g  =h + i =j " );
 
@@ -160,10 +158,10 @@ public class RdnTest
     /**
      * test a simple RDN with an oid prefix (uppercase) : OID.12.34.56 = azerty
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnOidUpper() throws InvalidNameException
+    public void testRdnOidUpper() throws LdapException
     {
         assertEquals( "oid.12.34.56=azerty", new RDN( "OID.12.34.56 =  azerty" ).toString() );
     }
@@ -172,10 +170,10 @@ public class RdnTest
     /**
      * test a simple RDN with an oid prefix (lowercase) : oid.12.34.56 = azerty
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnOidLower() throws InvalidNameException
+    public void testRdnOidLower() throws LdapException
     {
         assertEquals( "oid.12.34.56=azerty", new RDN( "oid.12.34.56 = azerty" ).toString() );
     }
@@ -185,10 +183,10 @@ public class RdnTest
      * test a simple RDN with an oid attribut wiithout oid prefix : 12.34.56 =
      * azerty
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnOidWithoutPrefix() throws InvalidNameException
+    public void testRdnOidWithoutPrefix() throws LdapException
     {
         assertEquals( "12.34.56=azerty", new RDN( "12.34.56 = azerty" ).toString() );
     }
@@ -198,10 +196,10 @@ public class RdnTest
      * test a composite RDN with an oid attribut wiithout oid prefix : 12.34.56 =
      * azerty; 7.8 = test
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnCompositeOidWithoutPrefix() throws InvalidNameException
+    public void testRdnCompositeOidWithoutPrefix() throws LdapException
     {
         String result = new RDN( "12.34.56 = azerty + 7.8 = test" ).toString();
         assertEquals( "12.34.56=azerty+7.8=test", result );
@@ -211,10 +209,10 @@ public class RdnTest
     /**
      * test a simple RDN with pair char attribute value : a = \,\=\+\<\>\#\;\\\"\C3\A9"
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnPairCharAttributeValue() throws InvalidNameException
+    public void testRdnPairCharAttributeValue() throws LdapException
     {
         String rdn = StringTools.utf8ToString( new byte[]
             { 'a', '=', '\\', ',', '=', '\\', '+', '\\', '<', '\\', '>', '#', '\\', ';', '\\', '\\', '\\', '"', '\\',
@@ -227,7 +225,7 @@ public class RdnTest
      * test a simple RDN with hexString attribute value : a = #0010A0AAFF
      */
     @Test
-    public void testRdnHexStringAttributeValue() throws InvalidNameException
+    public void testRdnHexStringAttributeValue() throws LdapException
     {
         assertEquals( "a=#0010A0AAFF", new RDN( "a = #0010A0AAFF" ).toString() );
     }
@@ -236,14 +234,14 @@ public class RdnTest
      * test exception from illegal hexString attribute value : a=#zz.
      */
     @Test
-    public void testBadRdnHexStringAttributeValue() throws InvalidNameException
+    public void testBadRdnHexStringAttributeValue() throws LdapException
     {
         try
         {
             new RDN( "a=#zz" );
             fail();
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             assertTrue( true );
         }
@@ -252,10 +250,10 @@ public class RdnTest
     /**
      * test a simple RDN with quoted attribute value : a = "quoted \"value"
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRdnQuotedAttributeValue() throws InvalidNameException
+    public void testRdnQuotedAttributeValue() throws LdapException
     {
         assertEquals( "a=quoted \\\"value", new RDN( "a = quoted \\\"value" ).toString() );
     }
@@ -274,7 +272,7 @@ public class RdnTest
             RdnParser.parse( "c=d", rdn );
             fail();
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             assertTrue( true );
         }
@@ -284,10 +282,10 @@ public class RdnTest
     /**
      * Test the clone method for a RDN.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCloningOneNameComponent() throws InvalidNameException
+    public void testRDNCloningOneNameComponent() throws LdapException
     {
         RDN rdn = new RDN( "a", "a", "b", "b" );
 
@@ -302,10 +300,10 @@ public class RdnTest
     /**
      * Test teh creation of a new RDN
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCreation() throws InvalidNameException
+    public void testRDNCreation() throws LdapException
     {
         RDN rdn = new RDN( "A", "  b  " );
         assertEquals( "a=\\  b \\ ", rdn.getNormName() );
@@ -316,10 +314,10 @@ public class RdnTest
     /**
      * Test the clone method for a RDN.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCloningTwoNameComponent() throws InvalidNameException
+    public void testRDNCloningTwoNameComponent() throws LdapException
     {
         RDN rdn = new RDN( "a = b + aa = bb" );
 
@@ -337,10 +335,10 @@ public class RdnTest
     /**
      * Test the compareTo method for a RDN.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNull() throws InvalidNameException
+    public void testRDNCompareToNull() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + c = d + a = f + g = h " );
         RDN rdn2 = null;
@@ -351,10 +349,10 @@ public class RdnTest
     /**
      * Compares a composite NC to a single NC.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNCS2NC() throws InvalidNameException
+    public void testRDNCompareToNCS2NC() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + c = d + a = f + g = h " );
         RDN rdn2 = new RDN( " a = b " );
@@ -365,10 +363,10 @@ public class RdnTest
     /**
      * Compares a single NC to a composite NC.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNC2NCS() throws InvalidNameException
+    public void testRDNCompareToNC2NCS() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
         RDN rdn2 = new RDN( " a = b + c = d + a = f + g = h " );
@@ -380,10 +378,10 @@ public class RdnTest
     /**
      * Compares a composite NCS to a composite NCS in the same order.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNCS2NCSOrdered() throws InvalidNameException
+    public void testRDNCompareToNCS2NCSOrdered() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + c = d + a = f + g = h " );
         RDN rdn2 = new RDN( " a = b + c = d + a = f + g = h " );
@@ -395,10 +393,10 @@ public class RdnTest
     /**
      * Compares a composite NCS to a composite NCS in a different order.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNCS2NCSUnordered() throws InvalidNameException
+    public void testRDNCompareToNCS2NCSUnordered() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + a = f + g = h + c = d " );
         RDN rdn2 = new RDN( " a = b + c = d + a = f + g = h " );
@@ -410,10 +408,10 @@ public class RdnTest
     /**
      * Compares a composite NCS to a different composite NCS.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNCS2NCSNotEquals() throws InvalidNameException
+    public void testRDNCompareToNCS2NCSNotEquals() throws LdapException
     {
         RDN rdn1 = new RDN( " a = f + g = h + c = d " );
         RDN rdn2 = new RDN( " c = d + a = h + g = h " );
@@ -428,10 +426,10 @@ public class RdnTest
      * Test for DIRSHARED-2.
      * The first ATAV is equal, the second or following ATAV differs.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareSecondAtav() throws InvalidNameException
+    public void testCompareSecondAtav() throws LdapException
     {
         // the second ATAV differs
         RDN rdn1 = new RDN( " a = b + c = d " );
@@ -461,10 +459,10 @@ public class RdnTest
      * The compare operation should return a correct value (1 or -1)
      * depending on the ATAVs, not on their position.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareIndependentFromOrder() throws InvalidNameException
+    public void testCompareIndependentFromOrder() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + c = d " );
         RDN rdn2 = new RDN( " c = d + a = b " );
@@ -488,10 +486,10 @@ public class RdnTest
      * Test for DIRSHARED-3.
      * Tests that compareTo() is invertable for single-valued RDNs.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareInvertableNC2NC() throws InvalidNameException
+    public void testCompareInvertableNC2NC() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
         RDN rdn2 = new RDN( " a = c " );
@@ -506,10 +504,10 @@ public class RdnTest
      * Test for DIRSHARED-3.
      * Tests that compareTo() is invertable for multi-valued RDNs with different values.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareInvertableNCS2NCSDifferentValues() throws InvalidNameException
+    public void testCompareInvertableNCS2NCSDifferentValues() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + a = c " );
         RDN rdn2 = new RDN( " a = b + a = y " );
@@ -523,10 +521,10 @@ public class RdnTest
      * Test for DIRSHARED-3.
      * Tests that compareTo() is invertable for multi-valued RDNs with different types.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareInvertableNCS2NCSDifferentTypes() throws InvalidNameException
+    public void testCompareInvertableNCS2NCSDifferentTypes() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b + c = d  " );
         RDN rdn2 = new RDN( " e = f + g = h " );
@@ -540,10 +538,10 @@ public class RdnTest
      * Test for DIRSHARED-3.
      * Tests that compareTo() is invertable for multi-valued RDNs with different order.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testCompareInvertableNCS2NCSUnordered() throws InvalidNameException
+    public void testCompareInvertableNCS2NCSUnordered() throws LdapException
     {
         RDN rdn1 = new RDN( " c = d + a = b " );
         RDN rdn2 = new RDN( " a = b + e = f " );
@@ -556,10 +554,10 @@ public class RdnTest
     /**
      * Compares with a null RDN.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNullRdn() throws InvalidNameException
+    public void testRDNCompareToNullRdn() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
 
@@ -570,10 +568,10 @@ public class RdnTest
     /**
      * Compares with a bad object
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToBadObject() throws InvalidNameException
+    public void testRDNCompareToBadObject() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
 
@@ -584,10 +582,10 @@ public class RdnTest
     /**
      * Compares a simple NC to a simple NC.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNC2NC() throws InvalidNameException
+    public void testRDNCompareToNC2NC() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
         RDN rdn2 = new RDN( " a = b " );
@@ -599,10 +597,10 @@ public class RdnTest
     /**
      * Compares a simple NC to a simple NC in UperCase.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNC2NCUperCase() throws InvalidNameException
+    public void testRDNCompareToNC2NCUperCase() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
         RDN rdn2 = new RDN( " A = b " );
@@ -615,10 +613,10 @@ public class RdnTest
     /**
      * Compares a simple NC to a different simple NC.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testRDNCompareToNC2NCNotEquals() throws InvalidNameException
+    public void testRDNCompareToNC2NCNotEquals() throws LdapException
     {
         RDN rdn1 = new RDN( " a = b " );
         RDN rdn2 = new RDN( " A = d " );
@@ -631,10 +629,10 @@ public class RdnTest
      * 
      * Test the getValue method.
      *
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testGetValue() throws InvalidNameException
+    public void testGetValue() throws LdapException
     {
         RDN rdn = new RDN( " a = b + a = f + g = h + c = d " );
 
@@ -646,10 +644,10 @@ public class RdnTest
      * 
      * Test the getType method.
      *
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testGetType() throws InvalidNameException
+    public void testGetType() throws LdapException
     {
         RDN rdn = new RDN( " a = b + a = f + g = h + c = d " );
 
@@ -660,10 +658,10 @@ public class RdnTest
     /**
      * Test the getSize method.
      *
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testGetSize() throws InvalidNameException
+    public void testGetSize() throws LdapException
     {
         RDN rdn = new RDN( " a = b + a = f + g = h + c = d " );
 
@@ -687,10 +685,10 @@ public class RdnTest
     /**
      * Test the equals method
      *
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testEquals() throws InvalidNameException
+    public void testEquals() throws LdapException
     {
         RDN rdn = new RDN( "a=b + c=d + a=f" );
 
@@ -833,7 +831,7 @@ public class RdnTest
 
 
     @Test
-    public void testDIRSERVER_703() throws InvalidNameException
+    public void testDIRSERVER_703() throws LdapException
     {
         RDN rdn = new RDN( "cn=Kate Bush+sn=Bush" );
         assertEquals( "cn=Kate Bush+sn=Bush", rdn.getUpName() );
@@ -841,7 +839,7 @@ public class RdnTest
 
 
     @Test
-    public void testMultiValuedIterator() throws InvalidNameException
+    public void testMultiValuedIterator() throws LdapException
     {
         RDN rdn = new RDN( "cn=Kate Bush+sn=Bush" );
         Iterator<AVA> iterator = rdn.iterator();
@@ -855,7 +853,7 @@ public class RdnTest
 
 
     @Test
-    public void testSingleValuedIterator() throws InvalidNameException
+    public void testSingleValuedIterator() throws LdapException
     {
         RDN rdn = new RDN( "cn=Kate Bush" );
         Iterator<AVA> iterator = rdn.iterator();
@@ -877,7 +875,7 @@ public class RdnTest
 
 
     @Test
-    public void testRdnWithSpaces() throws InvalidNameException
+    public void testRdnWithSpaces() throws LdapException
     {
         RDN rdn = new RDN( "cn=a\\ b\\ c" );
         assertEquals( "cn=a b c", rdn.toString() );
@@ -885,7 +883,7 @@ public class RdnTest
 
 
     @Test
-    public void testEscapedSpaceInValue() throws InvalidNameException
+    public void testEscapedSpaceInValue() throws LdapException
     {
         RDN rdn1 = new RDN( "cn=a b c" );
         RDN rdn2 = new RDN( "cn=a\\ b\\ c" );
@@ -902,7 +900,7 @@ public class RdnTest
 
 
     @Test
-    public void testEscapedHashInValue() throws InvalidNameException
+    public void testEscapedHashInValue() throws LdapException
     {
         RDN rdn1 = new RDN( "cn=a#b#c" );
         RDN rdn2 = new RDN( "cn=a\\#b\\#c" );
@@ -952,7 +950,7 @@ public class RdnTest
      * Test serialization of an empty RDN
      */
     @Test
-    public void testEmptyRDNSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyRDNSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( "" );
 
@@ -1001,7 +999,7 @@ public class RdnTest
      * Test serialization of a simple Rdn
      */
     @Test
-    public void testSimpleRdnSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( "a=b" );
         rdn.normalize();
@@ -1026,7 +1024,7 @@ public class RdnTest
      * Test serialization of a simple Rdn
      */
     @Test
-    public void testSimpleRdn2Serialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdn2Serialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  = DEF " );
         rdn.normalize();
@@ -1051,7 +1049,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with no value
      */
     @Test
-    public void testSimpleRdnNoValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnNoValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  =" );
         rdn.normalize();
@@ -1076,7 +1074,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with one value
      */
     @Test
-    public void testSimpleRdnOneValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnOneValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  = def " );
         rdn.normalize();
@@ -1101,7 +1099,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with three values
      */
     @Test
-    public void testSimpleRdnThreeValuesSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnThreeValuesSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " A = a + B = b + C = c " );
         rdn.normalize();
@@ -1126,7 +1124,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with three unordered values
      */
     @Test
-    public void testSimpleRdnThreeValuesUnorderedSerialization() throws NamingException, IOException,
+    public void testSimpleRdnThreeValuesUnorderedSerialization() throws LdapException, IOException,
         ClassNotFoundException
     {
         RDN rdn = new RDN( " B = b + A = a + C = c " );
@@ -1154,7 +1152,7 @@ public class RdnTest
      * Test serialization of an empty RDN
      */
     @Test
-    public void testEmptyRDNStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyRDNStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( "" );
 
@@ -1205,7 +1203,7 @@ public class RdnTest
      * Test serialization of a simple Rdn
      */
     @Test
-    public void testSimpleRdnStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( "a=b" );
         rdn.normalize();
@@ -1231,7 +1229,7 @@ public class RdnTest
      * Test serialization of a simple Rdn
      */
     @Test
-    public void testSimpleRdn2StaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdn2StaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  = DEF " );
         rdn.normalize();
@@ -1257,7 +1255,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with no value
      */
     @Test
-    public void testSimpleRdnNoValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnNoValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  =" );
         rdn.normalize();
@@ -1283,7 +1281,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with one value
      */
     @Test
-    public void testSimpleRdnOneValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testSimpleRdnOneValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         RDN rdn = new RDN( " ABC  = def " );
         rdn.normalize();
@@ -1309,7 +1307,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with three values
      */
     @Test
-    public void testSimpleRdnThreeValuesStaticSerialization() throws NamingException, IOException,
+    public void testSimpleRdnThreeValuesStaticSerialization() throws LdapException, IOException,
         ClassNotFoundException
     {
         RDN rdn = new RDN( " A = a + B = b + C = c " );
@@ -1336,7 +1334,7 @@ public class RdnTest
      * Test serialization of a simple Rdn with three unordered values
      */
     @Test
-    public void testSimpleRdnThreeValuesUnorderedStaticSerialization() throws NamingException, IOException,
+    public void testSimpleRdnThreeValuesUnorderedStaticSerialization() throws LdapException, IOException,
         ClassNotFoundException
     {
         RDN rdn = new RDN( " B = b + A = a + C = c " );
@@ -1363,7 +1361,7 @@ public class RdnTest
      * test an RDN with empty value
      */
     @Test
-    public void testRdnWithEmptyValue() throws InvalidNameException
+    public void testRdnWithEmptyValue() throws LdapException
     {
         assertTrue( RdnParser.isValid( "a=" ) );
         assertTrue( RdnParser.isValid( "a=\"\"" ) );
@@ -1376,7 +1374,7 @@ public class RdnTest
      * test an RDN with escaped comma
      */
     @Test
-    public void testRdnWithEscapedComa() throws InvalidNameException
+    public void testRdnWithEscapedComa() throws LdapException
     {
         assertTrue( RdnParser.isValid( "a=b\\,c" ) );
         assertEquals( "a=b\\,c", new RDN( "a=b\\,c" ).toString() );
@@ -1396,10 +1394,10 @@ public class RdnTest
      * Tests the equals and compareTo results of cloned multi-valued RDNs.
      * Test for DIRSHARED-9.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testComparingOfClonedMultiValuedRDNs() throws InvalidNameException
+    public void testComparingOfClonedMultiValuedRDNs() throws LdapException
     {
         // Use upper case attribute types to test if normalized types are used 
         // for comparison
@@ -1415,10 +1413,10 @@ public class RdnTest
      * Tests the equals and compareTo results of copy constructed multi-valued RDNs.
      * Test for DIRSHARED-9.
      * 
-     * @throws InvalidNameException
+     * @throws LdapException
      */
     @Test
-    public void testComparingOfCopyConstructedMultiValuedRDNs() throws InvalidNameException
+    public void testComparingOfCopyConstructedMultiValuedRDNs() throws LdapException
     {
         // Use upper case attribute types to test if normalized types are used 
         // for comparison
@@ -1434,7 +1432,7 @@ public class RdnTest
      * test the UpName method on a RDN with more than one atav
      */
     @Test 
-    public void testGetUpNameMultipleAtav() throws InvalidNameException
+    public void testGetUpNameMultipleAtav() throws LdapException
     {
         RDN rdn = new RDN( " A = b + C = d " );
         

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizerTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizerTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizerTest.java Tue Mar 16 00:31:36 2010
@@ -20,8 +20,7 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimNormalizer;
 import org.junit.Test;
@@ -37,7 +36,7 @@ import static org.junit.Assert.assertEqu
 public class DeepTrimNormalizerTest
 {
     @Test
-    public void testDeepTrimNormalizerNull() throws NamingException
+    public void testDeepTrimNormalizerNull() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "", normalizer.normalize( ( String ) null ) );
@@ -45,7 +44,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testDeepTrimNormalizerEmpty() throws NamingException
+    public void testDeepTrimNormalizerEmpty() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "", normalizer.normalize( "" ) );
@@ -53,7 +52,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testDeepTrimNormalizerOneSpace() throws NamingException
+    public void testDeepTrimNormalizerOneSpace() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "", normalizer.normalize( " " ) );
@@ -61,7 +60,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testDeepTrimNormalizerTwoSpaces() throws NamingException
+    public void testDeepTrimNormalizerTwoSpaces() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "", normalizer.normalize( "  " ) );
@@ -69,7 +68,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testDeepTrimNormalizerNSpaces() throws NamingException
+    public void testDeepTrimNormalizerNSpaces() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "", normalizer.normalize( "      " ) );
@@ -77,7 +76,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringOneChar() throws NamingException
+    public void testInsignifiantSpacesStringOneChar() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "a", normalizer.normalize( "a" ) );
@@ -85,7 +84,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringTwoChars() throws NamingException
+    public void testInsignifiantSpacesStringTwoChars() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "aa", normalizer.normalize( "aa" ) );
@@ -93,7 +92,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringNChars() throws NamingException
+    public void testInsignifiantSpacesStringNChars() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "aaaaa", normalizer.normalize( "aaaaa" ) );
@@ -101,7 +100,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringOneCombining() throws NamingException
+    public void testInsignifiantSpacesStringOneCombining() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         char[] chars = new char[]
@@ -113,7 +112,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringNCombining() throws NamingException
+    public void testInsignifiantSpacesStringNCombining() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         char[] chars = new char[]
@@ -125,7 +124,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringCharsSpaces() throws NamingException
+    public void testInsignifiantSpacesStringCharsSpaces() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         assertEquals( "a", normalizer.normalize( " a" ) );
@@ -141,7 +140,7 @@ public class DeepTrimNormalizerTest
 
 
     @Test
-    public void testNormalizeCharsCombiningSpaces() throws NamingException
+    public void testNormalizeCharsCombiningSpaces() throws LdapException
     {
         Normalizer normalizer = new DeepTrimNormalizer( "1.1.1" );
         char[] chars = new char[]

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizerTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizerTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizerTest.java Tue Mar 16 00:31:36 2010
@@ -20,8 +20,7 @@
 package org.apache.directory.shared.ldap.schema.normalizers;
 
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.NumericNormalizer;
 import org.junit.Test;
@@ -36,7 +35,7 @@ import static org.junit.Assert.assertEqu
 public class NumericNormalizerTest
 {
     @Test
-    public void testNumericNormalizerNull() throws NamingException
+    public void testNumericNormalizerNull() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "", normalizer.normalize( ( String ) null ) );
@@ -44,7 +43,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testNumericNormalizerEmpty() throws NamingException
+    public void testNumericNormalizerEmpty() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "", normalizer.normalize( "" ) );
@@ -52,7 +51,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testNumericNormalizerOneSpace() throws NamingException
+    public void testNumericNormalizerOneSpace() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "", normalizer.normalize( " " ) );
@@ -60,7 +59,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testNumericNormalizerTwoSpaces() throws NamingException
+    public void testNumericNormalizerTwoSpaces() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "", normalizer.normalize( "  " ) );
@@ -68,7 +67,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testNumericNormalizerNSpaces() throws NamingException
+    public void testNumericNormalizerNSpaces() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "", normalizer.normalize( "      " ) );
@@ -76,7 +75,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringOneChar() throws NamingException
+    public void testInsignifiantSpacesStringOneChar() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "1", normalizer.normalize( "1" ) );
@@ -84,7 +83,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringTwoChars() throws NamingException
+    public void testInsignifiantSpacesStringTwoChars() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "11", normalizer.normalize( "11" ) );
@@ -92,7 +91,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testInsignifiantSpacesStringNChars() throws NamingException
+    public void testInsignifiantSpacesStringNChars() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "123456", normalizer.normalize( "123456" ) );
@@ -100,7 +99,7 @@ public class NumericNormalizerTest
 
 
     @Test
-    public void testInsignifiantNumericCharsSpaces() throws NamingException
+    public void testInsignifiantNumericCharsSpaces() throws LdapException
     {
         Normalizer normalizer = new NumericNormalizer();
         assertEquals( "1", normalizer.normalize( " 1" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizerTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizerTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizerTest.java Tue Mar 16 00:31:36 2010
@@ -19,9 +19,7 @@
  */
 package org.apache.directory.shared.ldap.schema.normalizers;
 
-
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.TelephoneNumberNormalizer;
 import org.junit.Test;
@@ -36,7 +34,7 @@ import static org.junit.Assert.assertEqu
 public class TelephoneNumberNormalizerTest
 {
     @Test
-    public void testTelephoneNumberNormalizerNull() throws NamingException
+    public void testTelephoneNumberNormalizerNull() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( ( String ) null ) );
@@ -44,7 +42,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerEmpty() throws NamingException
+    public void testTelephoneNumberNormalizerEmpty() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( "" ) );
@@ -52,7 +50,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerOneSpace() throws NamingException
+    public void testTelephoneNumberNormalizerOneSpace() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( " " ) );
@@ -60,7 +58,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerTwoSpaces() throws NamingException
+    public void testTelephoneNumberNormalizerTwoSpaces() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( "  " ) );
@@ -68,7 +66,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerNSpaces() throws NamingException
+    public void testTelephoneNumberNormalizerNSpaces() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( "      " ) );
@@ -76,7 +74,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerOneHyphen() throws NamingException
+    public void testTelephoneNumberNormalizerOneHyphen() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( "-" ) );
@@ -84,7 +82,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerTwoHyphen() throws NamingException
+    public void testTelephoneNumberNormalizerTwoHyphen() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( "--" ) );
@@ -92,7 +90,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testTelephoneNumberNormalizerHyphensSpaces() throws NamingException
+    public void testTelephoneNumberNormalizerHyphensSpaces() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "", normalizer.normalize( " -- - -- " ) );
@@ -100,7 +98,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testInsignifiantSpacesStringOneChar() throws NamingException
+    public void testInsignifiantSpacesStringOneChar() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "1", normalizer.normalize( "1" ) );
@@ -108,7 +106,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testInsignifiantSpacesStringTwoChars() throws NamingException
+    public void testInsignifiantSpacesStringTwoChars() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "11", normalizer.normalize( "11" ) );
@@ -116,7 +114,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testInsignifiantSpacesStringNChars() throws NamingException
+    public void testInsignifiantSpacesStringNChars() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "123456", normalizer.normalize( "123456" ) );
@@ -124,7 +122,7 @@ public class TelephoneNumberNormalizerTe
 
 
     @Test
-    public void testInsignifiantTelephoneNumberCharsSpaces() throws NamingException
+    public void testInsignifiantTelephoneNumberCharsSpaces() throws LdapException
     {
         Normalizer normalizer = new TelephoneNumberNormalizer();
         assertEquals( "1", normalizer.normalize( " 1" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistryTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistryTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/AttributeTypeRegistryTest.java Tue Mar 16 00:31:36 2010
@@ -24,8 +24,7 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.junit.Before;
 import org.junit.Test;
@@ -49,7 +48,7 @@ public class AttributeTypeRegistryTest
     
     
     @Test
-    public void testUnregister() throws NamingException
+    public void testUnregister() throws LdapException
     {
         AttributeType at0 = new AttributeType( "1.1" );
         at0.addName( "t", "test", "Test", "T" );
@@ -66,7 +65,7 @@ public class AttributeTypeRegistryTest
             atRegistry.getOidByName( "T" );
             fail();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             assertTrue( true );
         }
@@ -74,7 +73,7 @@ public class AttributeTypeRegistryTest
     
     
     @Test
-    public void testRegister() throws NamingException
+    public void testRegister() throws LdapException
     {
         AttributeType at0 = new AttributeType( "1.1" );
         at0.addName( "t", "test", "Test", "T" );
@@ -91,7 +90,7 @@ public class AttributeTypeRegistryTest
             atRegistry.register( at0 );
             fail();
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             assertTrue( true );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/schema/syntax/parser/NameFormDescriptionSchemaParserTest.java Tue Mar 16 00:31:36 2010
@@ -22,8 +22,7 @@ package org.apache.directory.shared.ldap
 
 import java.text.ParseException;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.schema.NameForm;
 import org.apache.directory.shared.ldap.schema.parsers.NameFormDescriptionSchemaParser;
 import org.junit.After;
@@ -113,7 +112,7 @@ public class NameFormDescriptionSchemaPa
      * @throws ParseException
      */
     @Test
-    public void testOc() throws ParseException, NamingException
+    public void testOc() throws ParseException, LdapException
     {
         String value = null;
         NameForm nf = null;
@@ -215,7 +214,7 @@ public class NameFormDescriptionSchemaPa
      * @throws ParseException
      */
     @Test
-    public void testMust() throws ParseException, NamingException
+    public void testMust() throws ParseException, LdapException
     {
         String value = null;
         NameForm nf = null;
@@ -294,7 +293,7 @@ public class NameFormDescriptionSchemaPa
      * @throws ParseException
      */
     @Test
-    public void testMay() throws ParseException, NamingException
+    public void testMay() throws ParseException, LdapException
     {
         String value = null;
         NameForm nf = null;
@@ -367,7 +366,7 @@ public class NameFormDescriptionSchemaPa
      * @throws ParseException
      */
     @Test
-    public void testFull() throws ParseException, NamingException
+    public void testFull() throws ParseException, LdapException
     {
         String value = null;
         NameForm nf = null;
@@ -426,7 +425,7 @@ public class NameFormDescriptionSchemaPa
      * @throws ParseException
      */
     @Test
-    public void testRequiredElements() throws ParseException, NamingException
+    public void testRequiredElements() throws ParseException, LdapException
     {
         String value = null;
         NameForm nf = null;
@@ -526,7 +525,7 @@ public class NameFormDescriptionSchemaPa
      * Tests quirks mode.
      */
     @Test
-    public void testQuirksMode() throws ParseException, NamingException
+    public void testQuirksMode() throws ParseException, LdapException
     {
         SchemaParserTestUtils.testQuirksMode( parser, "OC o MUST m" );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/AttributeUtilsTest.java Tue Mar 16 00:31:36 2010
@@ -27,8 +27,6 @@ import static org.junit.Assert.assertTru
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -37,6 +35,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.junit.Test;
 
 /**
@@ -51,7 +50,7 @@ public class AttributeUtilsTest
      * Test a addModification applied to an empty entry
      */
     @Test
-    public void testApplyAddModificationToEmptyEntry() throws NamingException
+    public void testApplyAddModificationToEmptyEntry() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         EntryAttribute attr = new DefaultClientAttribute( "cn", "test" );
@@ -67,7 +66,7 @@ public class AttributeUtilsTest
      * Test a addModification applied to an entry 
      */
     @Test
-    public void testApplyAddModificationToEntry() throws NamingException
+    public void testApplyAddModificationToEntry() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.add( "dc", "apache" );
@@ -88,7 +87,7 @@ public class AttributeUtilsTest
      * but with another value 
      */
     @Test
-    public void testApplyAddModificationToEntryWithValues() throws NamingException
+    public void testApplyAddModificationToEntryWithValues() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put( "cn", "apache" );
@@ -126,7 +125,7 @@ public class AttributeUtilsTest
      * and the same value 
      */
     @Test
-    public void testApplyAddModificationToEntryWithSameValue() throws NamingException
+    public void testApplyAddModificationToEntryWithSameValue() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put( "cn", "test", "apache" );
@@ -163,7 +162,7 @@ public class AttributeUtilsTest
      * Test the deletion of an attribute into an empty entry
      */
     @Test
-    public void testApplyRemoveModificationFromEmptyEntry() throws NamingException
+    public void testApplyRemoveModificationFromEmptyEntry() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
 
@@ -180,7 +179,7 @@ public class AttributeUtilsTest
      * Test the deletion of an attribute into an entry which does not contain the attribute
      */
     @Test
-    public void testApplyRemoveModificationFromEntryAttributeNotPresent() throws NamingException
+    public void testApplyRemoveModificationFromEntryAttributeNotPresent() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
 
@@ -205,7 +204,7 @@ public class AttributeUtilsTest
      * but without the value to be deleted
      */
     @Test
-    public void testApplyRemoveModificationFromEntryAttributeNotSameValue() throws NamingException
+    public void testApplyRemoveModificationFromEntryAttributeNotSameValue() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
 
@@ -230,7 +229,7 @@ public class AttributeUtilsTest
      * The entry should not contain the attribute after the operation
      */
     @Test
-    public void testApplyRemoveModificationFromEntrySameAttributeSameValue() throws NamingException
+    public void testApplyRemoveModificationFromEntrySameAttributeSameValue() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put( "cn", "test" );
@@ -253,7 +252,7 @@ public class AttributeUtilsTest
      * The entry should contain the attribute after the operation, but with one less value
      */
     @Test
-    public void testApplyRemoveModificationFromEntrySameAttributeValues() throws NamingException
+    public void testApplyRemoveModificationFromEntrySameAttributeValues() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put( "cn", "test", "apache" );
@@ -287,10 +286,10 @@ public class AttributeUtilsTest
      * 
      * As we are replacing a non existing attribute, it should be added.
      *
-     * @throws NamingException
+     * @throws LdapException
      */
     @Test
-    public void testApplyModifyModificationFromEmptyEntry() throws NamingException
+    public void testApplyModifyModificationFromEmptyEntry() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         
@@ -309,10 +308,10 @@ public class AttributeUtilsTest
      * 
      * As we are replacing a non existing attribute, it should not change the entry.
      *
-     * @throws NamingException
+     * @throws LdapException
      */
     @Test
-    public void testApplyModifyEmptyModificationFromEmptyEntry() throws NamingException
+    public void testApplyModifyEmptyModificationFromEmptyEntry() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         
@@ -330,10 +329,10 @@ public class AttributeUtilsTest
      * 
      * As we are replacing a non existing attribute, it should not change the entry.
      *
-     * @throws NamingException
+     * @throws LdapException
      */
     @Test
-    public void testApplyModifyAttributeModification() throws NamingException
+    public void testApplyModifyAttributeModification() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put( "cn", "test" );
@@ -374,10 +373,10 @@ public class AttributeUtilsTest
     /**
      * Test the removing by modification of an existing attribute in an .
      * 
-     * @throws NamingException
+     * @throws LdapException
      */
     @Test
-    public void testApplyModifyModificationRemoveAttribute() throws NamingException
+    public void testApplyModifyModificationRemoveAttribute() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         entry.put(  "cn", "test" );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/LdapUrlTest.java Tue Mar 16 00:31:36 2010
@@ -30,9 +30,8 @@ import static org.junit.Assert.fail;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.LdapURL.Extension;
@@ -736,7 +735,7 @@ public class LdapUrlTest
      * test the setDn() method
      */
     @Test
-    public void testDnSetDn() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetDn() throws LdapURLEncodingException, LdapInvalidDnException
     {
         LdapURL url = new LdapURL();
         assertNull( url.getDn() );
@@ -756,7 +755,7 @@ public class LdapUrlTest
      * test the setAttributes() method
      */
     @Test
-    public void testDnSetAttributes() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetAttributes() throws LdapURLEncodingException, LdapInvalidDnException
     {
         LdapURL url = new LdapURL();
         assertNotNull( url.getAttributes() );
@@ -788,7 +787,7 @@ public class LdapUrlTest
      * test the setScope() method
      */
     @Test
-    public void testDnSetScope() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetScope() throws LdapURLEncodingException, LdapInvalidDnException
     {
         LdapURL url = new LdapURL();
         assertEquals( SearchScope.OBJECT, url.getScope() );
@@ -813,7 +812,7 @@ public class LdapUrlTest
      * test the setFilter() method
      */
     @Test
-    public void testDnSetFilter() throws LdapURLEncodingException, InvalidNameException
+    public void testDnSetFilter() throws LdapURLEncodingException, LdapInvalidDnException
     {
         LdapURL url = new LdapURL();
         assertNull( url.getFilter() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/NamespaceToolsTest.java Tue Mar 16 00:31:36 2010
@@ -21,8 +21,8 @@ package org.apache.directory.shared.ldap
 
 
 import javax.naming.Name;
-import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.junit.Test;
@@ -74,7 +74,7 @@ public class NamespaceToolsTest
 
 
     @Test
-    public void testHasCompositeComponents() throws NamingException
+    public void testHasCompositeComponents() throws LdapException
     {
         assertTrue( NamespaceTools.hasCompositeComponents( "givenName=Alex+sn=Karasulu" ) );
         assertTrue( NamespaceTools.hasCompositeComponents( "givenName=Alex+sn=Karasulu+age=13" ) );
@@ -84,7 +84,7 @@ public class NamespaceToolsTest
 
 
     @Test
-    public void testGetCompositeComponents() throws NamingException
+    public void testGetCompositeComponents() throws LdapException
     {
         String[] args = NamespaceTools.getCompositeComponents( "givenName=Alex+sn=Karasulu" );
         assertEquals( "expecting two parts : ", 2, args.length );
@@ -108,7 +108,7 @@ public class NamespaceToolsTest
     
     
     @Test
-    public void testGetRelativeName() throws NamingException
+    public void testGetRelativeName() throws LdapException
     {
         // test the basis case first with the root
         DN ancestor = new DN( "" );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java Tue Mar 16 00:31:36 2010
@@ -24,8 +24,7 @@ import static org.junit.Assert.assertNot
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.assertFalse;
 
-import javax.naming.NamingException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.After;
 import org.junit.Before;
@@ -87,7 +86,7 @@ public class TestDnNode
     /**
      * Test the addition of a single DN
      */
-    @Test public void testNewTree() throws NamingException
+    @Test public void testNewTree() throws LdapException
     {
         /** A structure to hold all the DNs */
         DnBranchNode<DN> dnLookupTree = new DnBranchNode<DN>();
@@ -113,7 +112,7 @@ public class TestDnNode
      * Test additions in a tree 
      */
     @Test
-    public void testComplexTreeCreation() throws NamingException
+    public void testComplexTreeCreation() throws LdapException
     {
         
         assertTrue( dnLookupTree.hasParentElement( dn1 ) );
@@ -133,7 +132,7 @@ public class TestDnNode
      *
      */
     @Test
-    public void testAddEntryTwice() throws NamingException
+    public void testAddEntryTwice() throws LdapException
     {
         assertEquals( 6, dnLookupTree.size() );
 
@@ -146,7 +145,7 @@ public class TestDnNode
      * test the deletion of elements in a tree
      */
     @Test
-    public void testComplexTreeDeletion() throws NamingException
+    public void testComplexTreeDeletion() throws LdapException
     {
         dnLookupTree.remove( dn3 );
         assertEquals( 5, dnLookupTree.size() );



Mime
View raw message