directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r923524 [5/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/entry/client/DefaultClientAttributeTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientAttributeTest.java Tue Mar 16 00:31:36 2010
@@ -35,11 +35,12 @@ import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 
-import javax.naming.NamingException;
 import javax.naming.directory.InvalidAttributeValueException;
 
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.schema.syntaxCheckers.Ia5StringSyntaxChecker;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.BeforeClass;
@@ -240,7 +241,7 @@ public class DefaultClientAttributeTest
      * Test method getBytes()
      */
     @Test
-    public void testGetBytes() throws InvalidAttributeValueException, NamingException
+    public void testGetBytes() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -261,7 +262,7 @@ public class DefaultClientAttributeTest
             attr3.getBytes();
             fail();
         }
-        catch ( InvalidAttributeValueException ivae )
+        catch ( LdapInvalidAttributeValueException ivae )
         {
             assertTrue( true );
         }
@@ -272,7 +273,7 @@ public class DefaultClientAttributeTest
      * Test method getString()
      */
     @Test
-    public void testGetString() throws InvalidAttributeValueException, NamingException
+    public void testGetString() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -293,7 +294,7 @@ public class DefaultClientAttributeTest
             attr3.getString();
             fail();
         }
-        catch ( InvalidAttributeValueException ivae )
+        catch ( LdapInvalidAttributeValueException ivae )
         {
             assertTrue( true );
         }
@@ -434,7 +435,7 @@ public class DefaultClientAttributeTest
      * Test method isValid( SyntaxChecker ) 
      */
     @Test
-    public void testIsValidSyntaxChecker() throws NamingException
+    public void testIsValidSyntaxChecker() throws LdapException
     {
         ClientAttribute attr = new DefaultClientAttribute( "test" );
         
@@ -475,7 +476,7 @@ public class DefaultClientAttributeTest
      * Test method add(Value...)
      */
     @Test
-    public void testAddValueArray() throws InvalidAttributeValueException, NamingException
+    public void testAddValueArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -545,7 +546,7 @@ public class DefaultClientAttributeTest
      * Test method add( String... )
      */
     @Test
-    public void testAddStringArray() throws InvalidAttributeValueException, NamingException
+    public void testAddStringArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -634,7 +635,7 @@ public class DefaultClientAttributeTest
      * Test method add( byte[]... )
      */
     @Test
-    public void testAddByteArray() throws InvalidAttributeValueException, NamingException
+    public void testAddByteArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -692,7 +693,7 @@ public class DefaultClientAttributeTest
      * Test method clear()
      */
     @Test
-    public void testClear() throws InvalidAttributeValueException, NamingException
+    public void testClear() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -719,7 +720,7 @@ public class DefaultClientAttributeTest
      * Test method contains( Value... )
      */
     @Test
-    public void testContainsValueArray() throws InvalidAttributeValueException, NamingException
+    public void testContainsValueArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -772,7 +773,7 @@ public class DefaultClientAttributeTest
      * Test method contains( String... )
      */
     @Test
-    public void testContainsStringArray() throws InvalidAttributeValueException, NamingException
+    public void testContainsStringArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -822,7 +823,7 @@ public class DefaultClientAttributeTest
      * Test method contains( byte... )
      */
     @Test
-    public void testContainsByteArray() throws InvalidAttributeValueException, NamingException
+    public void testContainsByteArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -872,7 +873,7 @@ public class DefaultClientAttributeTest
      * Test method get()
      */
     @Test
-    public void testGet() throws InvalidAttributeValueException, NamingException
+    public void testGet() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -945,7 +946,7 @@ public class DefaultClientAttributeTest
      * Test method size()
      */
     @Test
-    public void testSize() throws InvalidAttributeValueException, NamingException
+    public void testSize() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
 
@@ -968,7 +969,7 @@ public class DefaultClientAttributeTest
      * Test method remove( Value... )
      */
     @Test
-    public void testRemoveValueArray() throws InvalidAttributeValueException, NamingException
+    public void testRemoveValueArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
 
@@ -1038,7 +1039,7 @@ public class DefaultClientAttributeTest
      * Test method remove( byte... )
      */
     @Test
-    public void testRemoveByteArray() throws InvalidAttributeValueException, NamingException
+    public void testRemoveByteArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
 
@@ -1079,7 +1080,7 @@ public class DefaultClientAttributeTest
      * Test method remove( String... )
      */
     @Test
-    public void testRemoveStringArray() throws InvalidAttributeValueException, NamingException
+    public void testRemoveStringArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
 
@@ -1120,7 +1121,7 @@ public class DefaultClientAttributeTest
      * Test method put( String... )
      */
     @Test
-    public void testPutStringArray() throws InvalidAttributeValueException, NamingException
+    public void testPutStringArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -1178,7 +1179,7 @@ public class DefaultClientAttributeTest
      * Test method put( byte[]... )
      */
     @Test
-    public void testPutByteArray() throws InvalidAttributeValueException, NamingException
+    public void testPutByteArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -1240,7 +1241,7 @@ public class DefaultClientAttributeTest
      * Test method put( Value... )
      */
     @Test
-    public void testPutValueArray() throws InvalidAttributeValueException, NamingException
+    public void testPutValueArray() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -1373,7 +1374,7 @@ public class DefaultClientAttributeTest
      * Test method toString()
      */
     @Test
-    public void testToString() throws InvalidAttributeValueException, NamingException
+    public void testToString() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr1 = new DefaultClientAttribute( "test" );
         
@@ -1399,7 +1400,7 @@ public class DefaultClientAttributeTest
      * Test method hashCode()
      */
     @Test
-    public void testHashCode() throws InvalidAttributeValueException, NamingException
+    public void testHashCode() throws InvalidAttributeValueException, LdapException
     {
         EntryAttribute attr = new DefaultClientAttribute();
         assertEquals( 37, attr.hashCode() );
@@ -1549,7 +1550,7 @@ public class DefaultClientAttributeTest
      * Test the serialization of a complete client attribute
      */
     @Test
-    public void testSerializeCompleteAttribute() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeCompleteAttribute() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultClientAttribute dca = new DefaultClientAttribute( "CommonName" );
         dca.setHR( true );
@@ -1571,7 +1572,7 @@ public class DefaultClientAttributeTest
      * Test the serialization of a client attribute with no value
      */
     @Test
-    public void testSerializeAttributeWithNoValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeWithNoValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultClientAttribute dca = new DefaultClientAttribute( "CommonName" );
         dca.setHR( true );
@@ -1591,7 +1592,7 @@ public class DefaultClientAttributeTest
      * Test the serialization of a client attribute with a null value
      */
     @Test
-    public void testSerializeAttributeNullValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeNullValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultClientAttribute dca = new DefaultClientAttribute( "CommonName" );
         dca.setHR( true );
@@ -1614,7 +1615,7 @@ public class DefaultClientAttributeTest
      * Test the serialization of a client attribute with a binary value
      */
     @Test
-    public void testSerializeAttributeBinaryValue() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeAttributeBinaryValue() throws LdapException, IOException, ClassNotFoundException
     {
         DefaultClientAttribute dca = new DefaultClientAttribute( "UserPassword" );
         dca.setHR( false );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/entry/client/DefaultClientEntryTest.java Tue Mar 16 00:31:36 2010
@@ -39,13 +39,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
@@ -86,7 +84,7 @@ public class DefaultClientEntryTest
             
             return entry;
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Do nothing
             return null;
@@ -304,7 +302,7 @@ public class DefaultClientEntryTest
      * Test method for add( EntryAttribute... )
      */
     @Test
-    public void testAddEntryAttributeArray() throws NamingException
+    public void testAddEntryAttributeArray() throws LdapException
     {
         Entry entry = createEntry();
         
@@ -338,7 +336,7 @@ public class DefaultClientEntryTest
      * Test method for add( String, byte[]... )
      */
     @Test
-    public void testAddStringByteArrayArray() throws NamingException
+    public void testAddStringByteArrayArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         
@@ -363,7 +361,7 @@ public class DefaultClientEntryTest
      * Test method for add( String, String... )
      */
     @Test
-    public void testAddStringStringArray() throws NamingException
+    public void testAddStringStringArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         
@@ -388,7 +386,7 @@ public class DefaultClientEntryTest
      * Test method for add( String, Value<?>... )
      */
     @Test
-    public void testAddStringValueArray() throws NamingException
+    public void testAddStringValueArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry();
         
@@ -432,7 +430,7 @@ public class DefaultClientEntryTest
      * Test method for clear()
      */
     @Test
-    public void testClear() throws NamingException
+    public void testClear() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -456,7 +454,7 @@ public class DefaultClientEntryTest
      * Test method for clone()
      */
     @Test
-    public void testClone() throws NamingException
+    public void testClone() throws LdapException
     {
         Entry entry1 = new DefaultClientEntry();
         
@@ -490,7 +488,7 @@ public class DefaultClientEntryTest
      * Test method for contains( EntryAttribute... )
      */
     @Test
-    public void testContainsEntryAttributeArray() throws NamingException
+    public void testContainsEntryAttributeArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -516,7 +514,7 @@ public class DefaultClientEntryTest
      * Test method for contains( String, byte[]... )
      */
     @Test
-    public void testContainsStringByteArray() throws NamingException
+    public void testContainsStringByteArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -540,7 +538,7 @@ public class DefaultClientEntryTest
      * Test method for contains( String, String... )
      */
     @Test
-    public void testContainsStringStringArray() throws NamingException
+    public void testContainsStringStringArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -569,7 +567,7 @@ public class DefaultClientEntryTest
      * Test method for contains( Sring, Value<?>... )
      */
     @Test
-    public void testContainsStringValueArray() throws NamingException
+    public void testContainsStringValueArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -602,7 +600,7 @@ public class DefaultClientEntryTest
      * Test method for containsAttribute( String )
      */
     @Test
-    public void testContainsAttribute() throws NamingException
+    public void testContainsAttribute() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -633,7 +631,7 @@ public class DefaultClientEntryTest
      * Test method for equals()
      */
     @Test
-    public void testEqualsObject() throws NamingException
+    public void testEqualsObject() throws LdapException
     {
         Entry entry1 = new DefaultClientEntry();
         Entry entry2 = new DefaultClientEntry();
@@ -681,7 +679,7 @@ public class DefaultClientEntryTest
      * Test method for get( String )
      */
     @Test
-    public void testGet() throws NamingException
+    public void testGet() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -709,7 +707,7 @@ public class DefaultClientEntryTest
      * Test method for getDN()
      */
     @Test
-    public void testGetDn() throws InvalidNameException 
+    public void testGetDn() throws LdapException 
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -726,7 +724,7 @@ public class DefaultClientEntryTest
      * Test method for hashcode()
      */
     @Test
-    public void testHashCode() throws InvalidNameException, NamingException
+    public void testHashCode() throws LdapException, LdapException
     {
         Entry entry1 = new DefaultClientEntry( EXAMPLE_DN );
         Entry entry2 = new DefaultClientEntry( EXAMPLE_DN );
@@ -761,7 +759,7 @@ public class DefaultClientEntryTest
      * Test method for hasObjectClass( String )
      */
     @Test
-    public void testHasObjectClass() throws NamingException
+    public void testHasObjectClass() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -782,7 +780,7 @@ public class DefaultClientEntryTest
      * Test method for Iterator()
      */
     @Test
-    public void testIterator() throws NamingException
+    public void testIterator() throws LdapException
     {
         Entry entry = createEntry();
         
@@ -813,7 +811,7 @@ public class DefaultClientEntryTest
      * Test method for put( EntryAttribute... )
      */
     @Test
-    public void testPutEntryAttributeArray() throws NamingException
+    public void testPutEntryAttributeArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -1016,7 +1014,7 @@ public class DefaultClientEntryTest
      * Test method for removeAttributes( String... )
      */
     @Test
-    public void testRemoveAttributesStringArray() throws NamingException
+    public void testRemoveAttributesStringArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
 
@@ -1044,7 +1042,7 @@ public class DefaultClientEntryTest
      * Test method for remove( EntryAttribute... )
      */
     @Test
-    public void testRemoveEntryAttributeArray() throws NamingException
+    public void testRemoveEntryAttributeArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -1076,7 +1074,7 @@ public class DefaultClientEntryTest
      * Test method for remove(String, byte[]... )
      */
     @Test
-    public void testRemoveStringByteArrayArray() throws NamingException
+    public void testRemoveStringByteArrayArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -1103,7 +1101,7 @@ public class DefaultClientEntryTest
      * Test method for remove( String, String... )
      */
     @Test
-    public void testRemoveStringStringArray() throws NamingException
+    public void testRemoveStringStringArray() throws LdapException
     {
         Entry entry = createEntry();
         
@@ -1127,7 +1125,7 @@ public class DefaultClientEntryTest
      * Test method for remove(String, Value<?>... )
      */
     @Test
-    public void testRemoveStringValueArray() throws NamingException
+    public void testRemoveStringValueArray() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
 
@@ -1166,7 +1164,7 @@ public class DefaultClientEntryTest
      * Test method for set( String... )
      */
     @Test
-    public void testSet() throws NamingException
+    public void testSet() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
 
@@ -1211,7 +1209,7 @@ public class DefaultClientEntryTest
      * Test method for size()
      */
     @Test
-    public void testSize() throws NamingException
+    public void testSize() throws LdapException
     {
         Entry entry = new DefaultClientEntry( EXAMPLE_DN );
         
@@ -1266,7 +1264,7 @@ public class DefaultClientEntryTest
      * Test the serialization of a complete entry
      */
     @Test
-    public void testSerializeCompleteEntry() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeCompleteEntry() throws LdapException, IOException, ClassNotFoundException
     {
         DN dn = new DN( "ou=system" );
         
@@ -1288,7 +1286,7 @@ public class DefaultClientEntryTest
      * Test the serialization of an entry with no DN
      */
     @Test
-    public void testSerializeEntryWithNoDN() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEntryWithNoDN() throws LdapException, IOException, ClassNotFoundException
     {
         byte[] password = StringTools.getBytesUtf8( "secret" );
         ClientEntry entry = new DefaultClientEntry();
@@ -1306,7 +1304,7 @@ public class DefaultClientEntryTest
      * Test the serialization of an entry with no attribute and no DN
      */
     @Test
-    public void testSerializeEntryWithNoDNNoAttribute() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEntryWithNoDNNoAttribute() throws LdapException, IOException, ClassNotFoundException
     {
         ClientEntry entry = new DefaultClientEntry();
 
@@ -1320,7 +1318,7 @@ public class DefaultClientEntryTest
      * Test the serialization of an entry with no attribute
      */
     @Test
-    public void testSerializeEntryWithNoAttribute() throws NamingException, IOException, ClassNotFoundException
+    public void testSerializeEntryWithNoAttribute() throws LdapException, IOException, ClassNotFoundException
     {
         DN dn = new DN( "ou=system" );
         

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java Tue Mar 16 00:31:36 2010
@@ -23,10 +23,9 @@ package org.apache.directory.shared.ldap
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.controls.ControlImpl;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractResultResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.internal.InternalReferral;
@@ -61,7 +60,7 @@ public class AbstractResultResponseTest
      * Tests to see the same exact copy returns true.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException
+    public void testEqualsExactCopy() throws LdapException
     {
         InternalAbstractResultResponse msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {
@@ -100,7 +99,7 @@ public class AbstractResultResponseTest
      * Tests to see the same exact copy returns true.
      */
     @Test
-    public void testNotEqualsDiffResult() throws InvalidNameException
+    public void testNotEqualsDiffResult() throws LdapException
     {
         InternalAbstractResultResponse msg0 = new InternalAbstractResultResponse( 5, MessageTypeEnum.BIND_REQUEST )
         {

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,14 +26,12 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 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.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -83,7 +81,7 @@ public class AddRequestImplTest
             entry.put( getAttribute( "attr1" ) );
             entry.put( getAttribute( "attr2" ) );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Do nothing
         }
@@ -107,7 +105,7 @@ public class AddRequestImplTest
      * Tests for equality using exact copies.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException, NamingException
+    public void testEqualsExactCopy() throws LdapException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
         req0.setEntryDn( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -125,7 +123,7 @@ public class AddRequestImplTest
      * Test for inequality when only the IDs are different.
      */
     @Test
-    public void testNotEqualDiffId() throws InvalidNameException, NamingException
+    public void testNotEqualDiffId() throws LdapException
     {
         AddRequestImpl req0 = new AddRequestImpl( 7 );
         req0.setEntryDn( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -143,7 +141,7 @@ public class AddRequestImplTest
      * Test for inequality when only the DN names are different.
      */
     @Test
-    public void testNotEqualDiffName() throws InvalidNameException, NamingException
+    public void testNotEqualDiffName() throws LdapException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
         req0.setEntry( getEntry() );
@@ -161,7 +159,7 @@ public class AddRequestImplTest
      * Test for inequality when only the DN names are different.
      */
     @Test
-    public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
+    public void testNotEqualDiffAttributes() throws LdapException
     {
         AddRequestImpl req0 = new AddRequestImpl( 5 );
         req0.setEntryDn( new DN( "cn=admin,dc=apache,dc=org" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,8 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -61,7 +60,7 @@ public class BindRequestImplTest
      * Tests for equality using exact copies.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException
+    public void testEqualsExactCopy() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
         req0.setCredentials( "password".getBytes() );
@@ -83,7 +82,7 @@ public class BindRequestImplTest
      * Test for inequality when only the IDs are different.
      */
     @Test
-    public void testNotEqualDiffId() throws InvalidNameException
+    public void testNotEqualDiffId() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 7 );
         req0.setCredentials( "password".getBytes() );
@@ -105,7 +104,7 @@ public class BindRequestImplTest
      * Test for inequality when only the credentials are different.
      */
     @Test
-    public void testNotEqualDiffCreds() throws InvalidNameException
+    public void testNotEqualDiffCreds() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
         req0.setCredentials( "abcdefg".getBytes() );
@@ -127,7 +126,7 @@ public class BindRequestImplTest
      * Test for inequality when only the DN names are different.
      */
     @Test
-    public void testNotEqualDiffName() throws InvalidNameException
+    public void testNotEqualDiffName() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
         req0.setCredentials( "password".getBytes() );
@@ -149,7 +148,7 @@ public class BindRequestImplTest
      * Test for inequality when only the auth mechanisms are different.
      */
     @Test
-    public void testNotEqualDiffSimple() throws InvalidNameException
+    public void testNotEqualDiffSimple() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
         req0.setCredentials( "password".getBytes() );
@@ -171,7 +170,7 @@ public class BindRequestImplTest
      * Test for inequality when only the bind LDAP versions are different.
      */
     @Test
-    public void testNotEqualDiffVersion() throws InvalidNameException
+    public void testNotEqualDiffVersion() throws LdapException
     {
         BindRequestImpl req0 = new BindRequestImpl( 5 );
         req0.setCredentials( "password".getBytes() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java Tue Mar 16 00:31:36 2010
@@ -20,8 +20,7 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import javax.naming.InvalidNameException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.BindResponseImpl;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
@@ -100,7 +99,7 @@ public class BindResponseImplTest
      * Tests for equality of two fully loaded identical BindResponse PDUs.
      */
     @Test
-    public void testEqualsWithTheWorks() throws InvalidNameException
+    public void testEqualsWithTheWorks() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,10 +26,9 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalCompareRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -62,7 +61,7 @@ public class CompareRequestImplTest
      * Tests for equality using exact copies.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException
+    public void testEqualsExactCopy() throws LdapException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
         req0.setName( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -83,7 +82,7 @@ public class CompareRequestImplTest
      * Test for inequality when only the IDs are different.
      */
     @Test
-    public void testNotEqualDiffId() throws InvalidNameException
+    public void testNotEqualDiffId() throws LdapException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 7 );
         req0.setName( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -100,7 +99,7 @@ public class CompareRequestImplTest
      * Test for inequality when only the attributeIds are different.
      */
     @Test
-    public void testNotEqualDiffAttributeIds() throws InvalidNameException
+    public void testNotEqualDiffAttributeIds() throws LdapException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
         req0.setName( new DN( "cn=admin,dc=apache,dc=org" ) );
@@ -121,7 +120,7 @@ public class CompareRequestImplTest
      * Test for inequality when only the Assertion values are different.
      */
     @Test
-    public void testNotEqualDiffValue() throws InvalidNameException
+    public void testNotEqualDiffValue() throws LdapException
     {
         CompareRequestImpl req0 = new CompareRequestImpl( 5 );
         req0.setName( new DN( "cn=admin,dc=apache,dc=org" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,8 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -61,7 +60,7 @@ public class DeleteRequestImplTest
      * Tests for equality using exact copies.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException
+    public void testEqualsExactCopy() throws LdapException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
         req0.setName( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -77,7 +76,7 @@ public class DeleteRequestImplTest
      * Test for inequality when only the IDs are different.
      */
     @Test
-    public void testNotEqualDiffId() throws InvalidNameException
+    public void testNotEqualDiffId() throws LdapException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 7 );
         req0.setName( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -93,7 +92,7 @@ public class DeleteRequestImplTest
      * Test for inequality when only the DN names are different.
      */
     @Test
-    public void testNotEqualDiffName() throws InvalidNameException
+    public void testNotEqualDiffName() throws LdapException
     {
         DeleteRequestImpl req0 = new DeleteRequestImpl( 5 );
         req0.setName( new DN( "uid=akarasulu,dc=example,dc=com" ) );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,8 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalExtendedResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
@@ -63,7 +62,7 @@ public class ExtendedResponseImplTest
         {
             result.setMatchedDn( new DN( "dc=example,dc=com" ) );
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             // Do nothing
         }
@@ -144,7 +143,7 @@ public class ExtendedResponseImplTest
                 {
                     result.setMatchedDn( new DN( "dc=example,dc=com" ) );
                 }
-                catch ( InvalidNameException ine ) 
+                catch ( LdapException ine ) 
                 {
                     // do nothing
                 }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java Tue Mar 16 00:31:36 2010
@@ -20,8 +20,7 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import javax.naming.InvalidNameException;
-
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
 import org.apache.directory.shared.ldap.message.ReferralImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -149,7 +148,7 @@ public class LdapResultImplTest
      * Tests two non default carbon copies for equality.
      */
     @Test
-    public void testEqualsCarbonCopy() throws InvalidNameException
+    public void testEqualsCarbonCopy() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();
@@ -180,7 +179,7 @@ public class LdapResultImplTest
      * Tests for inequality when the error message is different.
      */
     @Test
-    public void testNotEqualsDiffErrorMessage() throws InvalidNameException
+    public void testNotEqualsDiffErrorMessage() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();
@@ -211,7 +210,7 @@ public class LdapResultImplTest
      * Tests for inequality when the matchedDn properties are not the same.
      */
     @Test
-    public void testNotEqualsDiffMatchedDn() throws InvalidNameException
+    public void testNotEqualsDiffMatchedDn() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();
@@ -242,7 +241,7 @@ public class LdapResultImplTest
      * Tests for inequality when the resultCode properties are not the same.
      */
     @Test
-    public void testNotEqualsDiffResultCode() throws InvalidNameException
+    public void testNotEqualsDiffResultCode() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();
@@ -273,7 +272,7 @@ public class LdapResultImplTest
      * Tests for inequality when the referrals are not the same.
      */
     @Test
-    public void testNotEqualsDiffReferrals() throws InvalidNameException
+    public void testNotEqualsDiffReferrals() throws LdapException
     {
         LdapResultImpl r0 = new LdapResultImpl();
         LdapResultImpl r1 = new LdapResultImpl();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,8 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -64,7 +63,7 @@ public class ModifyDnRequestImplTest
             request.setNewRdn( new RDN( "dc=administrators" ) );
             request.setNewSuperior( new DN( "dc=groups,dc=apache,dc=org" ) );
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             // do nothing
         }
@@ -129,7 +128,7 @@ public class ModifyDnRequestImplTest
      * Test for inequality when only the DN names are different.
      */
     @Test
-    public void testNotEqualDiffName() throws InvalidNameException
+    public void testNotEqualDiffName() throws LdapException
     {
         ModifyDnRequestImpl req0 = getRequest();
         req0.setName( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -145,7 +144,7 @@ public class ModifyDnRequestImplTest
      * Test for inequality when only the newSuperior DNs are different.
      */
     @Test
-    public void testNotEqualDiffNewSuperior() throws InvalidNameException
+    public void testNotEqualDiffNewSuperior() throws LdapException
     {
         ModifyDnRequestImpl req0 = getRequest();
         req0.setNewSuperior( new DN( "cn=admin,dc=example,dc=com" ) );
@@ -177,7 +176,7 @@ public class ModifyDnRequestImplTest
      * Test for inequality when only the new Rdn properties are different.
      */
     @Test
-    public void testNotEqualDiffNewRdn() throws InvalidNameException
+    public void testNotEqualDiffNewRdn() throws LdapException
     {
         ModifyDnRequestImpl req0 = getRequest();
         req0.setNewRdn( new RDN( "cn=admin0" ) );
@@ -204,7 +203,7 @@ public class ModifyDnRequestImplTest
                 {
                     return new DN( "dc=admins,dc=apache,dc=org" );
                 }
-                catch ( InvalidNameException ine )
+                catch ( LdapException ine )
                 {
                     // do nothing
                     return null;
@@ -223,7 +222,7 @@ public class ModifyDnRequestImplTest
                 {
                     return new RDN( "dc=administrators" );
                 }
-                catch ( InvalidNameException ine )
+                catch ( LdapException ine )
                 {
                     // do nothing
                     return null;
@@ -253,7 +252,7 @@ public class ModifyDnRequestImplTest
                 {
                     return new DN( "dc=groups,dc=apache,dc=org" );
                 }
-                catch ( InvalidNameException ine )
+                catch ( LdapException ine )
                 {
                     // do nothing
                     return null;

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java Tue Mar 16 00:31:36 2010
@@ -29,14 +29,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
@@ -68,7 +67,7 @@ public class ModifyRequestImplTest
         {
             req.setName( new DN( "cn=admin,dc=apache,dc=org" ) );
         }
-        catch ( InvalidNameException ne )
+        catch ( LdapException ne )
         {
             // do nothing
         }
@@ -145,7 +144,7 @@ public class ModifyRequestImplTest
 
             assertFalse( req0.equals( req1 ) );
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             // do nothing
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,8 @@ import static org.junit.Assert.assertTru
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.naming.InvalidNameException;
-
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.internal.InternalLdapResult;
 import org.apache.directory.shared.ldap.message.internal.InternalSearchResponseDone;
@@ -61,7 +60,7 @@ public class SearchResponseDoneImplTest
         {
             result.setMatchedDn( new DN( "dc=example,dc=com" ) );
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             // do nothing
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java Tue Mar 16 00:31:36 2010
@@ -20,13 +20,11 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import javax.naming.InvalidNameException;
-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.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.SearchResponseEntryImpl;
 import org.apache.directory.shared.ldap.name.DN;
 import org.junit.Test;
@@ -63,7 +61,7 @@ public class SearchResponseEntryImplTest
      * 
      * @return The populated Entry object
      */
-    private Entry getEntry() throws NamingException
+    private Entry getEntry() throws LdapException
     {
         Entry attrs = new DefaultClientEntry();
         attrs.put( getEntry( "attr0" ) );
@@ -88,7 +86,7 @@ public class SearchResponseEntryImplTest
      * Tests for equality when an exact copy is compared.
      */
     @Test
-    public void testEqualsExactCopy() throws InvalidNameException, NamingException
+    public void testEqualsExactCopy() throws LdapException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
         resp0.setEntry( getEntry() );
@@ -107,7 +105,7 @@ public class SearchResponseEntryImplTest
      * Tests for inequality when the objectName dn is not the same.
      */
     @Test
-    public void testNotEqualDiffObjectName() throws InvalidNameException, NamingException
+    public void testNotEqualDiffObjectName() throws LdapException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
         resp0.setEntry( getEntry() );
@@ -126,7 +124,7 @@ public class SearchResponseEntryImplTest
      * Tests for inequality when the attributes are not the same.
      */
     @Test
-    public void testNotEqualDiffAttributes() throws InvalidNameException, NamingException
+    public void testNotEqualDiffAttributes() throws LdapException
     {
         SearchResponseEntryImpl resp0 = new SearchResponseEntryImpl( 5 );
         resp0.setEntry( getEntry() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java?rev=923524&r1=923523&r2=923524&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/AVATest.java Tue Mar 16 00:31:36 2010
@@ -26,9 +26,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
-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 static org.junit.Assert.assertEquals;
@@ -65,14 +63,14 @@ public class AVATest
      * Test a null type for an AttributeTypeAndValue
      */
     @Test
-    public void testAttributeTypeAndValueNullType() throws InvalidNameException
+    public void testAttributeTypeAndValueNullType() throws LdapException
     {
         try
         {
             new AVA( null, null, (String)null, (String)null );
             fail();
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             assertTrue( true );
         }
@@ -83,14 +81,14 @@ public class AVATest
      * Test an invalid type for an AttributeTypeAndValue
      */
     @Test
-    public void testAttributeTypeAndValueInvalidType() throws InvalidNameException
+    public void testAttributeTypeAndValueInvalidType() throws LdapException
     {
         try
         {
             new AVA( "  ", " ", (String)null, (String)null );
             fail();
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             assertTrue( true );
         }
@@ -101,7 +99,7 @@ public class AVATest
      * Test a valid type for an AttributeTypeAndValue
      */
     @Test
-    public void testAttributeTypeAndValueValidType() throws InvalidNameException
+    public void testAttributeTypeAndValueValidType() throws LdapException
     {
         AVA atav = new AVA( "A", "a", (String)null, (String)null );
         assertEquals( "a=", atav.toString() );
@@ -132,7 +130,7 @@ public class AVATest
             new AVA( "", "", "", "" );
             fail( "Should not occurs ... " );
         }
-        catch ( InvalidNameException ine )
+        catch ( LdapException ine )
         {
             assertTrue( true );
         }
@@ -143,7 +141,7 @@ public class AVATest
      * test a simple AttributeTypeAndValue : a = b
      */
     @Test
-    public void testLdapRDNSimple() throws InvalidNameException
+    public void testLdapRDNSimple() throws LdapException
     {
         AVA atav = new AVA( "a", "a", "b", "b" );
         assertEquals( "a=b", atav.toString() );
@@ -157,7 +155,7 @@ public class AVATest
      * Compares two equals atavs
      */
     @Test
-    public void testCompareToEquals() throws InvalidNameException
+    public void testCompareToEquals() throws LdapException
     {
         AVA atav1 = new AVA( "a", "a","b", "b" );
         AVA atav2 = new AVA( "a", "a","b", "b" );
@@ -170,7 +168,7 @@ public class AVATest
      * Compares two equals atavs but with a type in different case
      */
     @Test
-    public void testCompareToEqualsCase() throws InvalidNameException
+    public void testCompareToEqualsCase() throws LdapException
     {
         AVA atav1 = new AVA( "a", "a", "b", "b" );
         AVA atav2 = new AVA( "A", "A", "b", "b" );
@@ -184,7 +182,7 @@ public class AVATest
      * superior
      */
     @Test
-    public void testCompareAtav1TypeSuperior() throws InvalidNameException
+    public void testCompareAtav1TypeSuperior() throws LdapException
     {
         AVA atav1 = new AVA( "b", "b", "b", "b" );
             
@@ -199,7 +197,7 @@ public class AVATest
      * superior
      */
     @Test
-    public void testCompareAtav2TypeSuperior() throws InvalidNameException
+    public void testCompareAtav2TypeSuperior() throws LdapException
     {
         AVA atav1 = new AVA( "a", "a", "b", "b" );
         AVA atav2 = new AVA( "b", "b", "b", "b" );
@@ -213,7 +211,7 @@ public class AVATest
      * superior
      */
     @Test
-    public void testCompareAtav1ValueSuperior() throws InvalidNameException
+    public void testCompareAtav1ValueSuperior() throws LdapException
     {
         AVA atav1 = new AVA( "a", "a", "b", "b" );
         AVA atav2 = new AVA( "a", "a", "a", "a" );
@@ -227,7 +225,7 @@ public class AVATest
      * superior
      */
     @Test
-    public void testCompareAtav2ValueSuperior() throws InvalidNameException
+    public void testCompareAtav2ValueSuperior() throws LdapException
     {
         AVA atav1 = new AVA( "a", "a", "a", "a" );
         AVA atav2 = new AVA( "a", "a", "b", "b" );
@@ -237,7 +235,7 @@ public class AVATest
 
 
     @Test
-    public void testNormalize() throws InvalidNameException
+    public void testNormalize() throws LdapException
     {
         AVA atav = new AVA( " A ", " A ", "a", "a" );
 
@@ -252,7 +250,7 @@ public class AVATest
      * Test serialization of a simple ATAV
      */
     @Test
-    public void testStringAtavSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testStringAtavSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "cn", "CN", "test", "Test" );
 
@@ -275,7 +273,7 @@ public class AVATest
 
 
     @Test
-    public void testBinaryAtavSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testBinaryAtavSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         byte[] upValue = StringTools.getBytesUtf8( "  Test  " );
         byte[] normValue = StringTools.getBytesUtf8( "Test" );
@@ -304,7 +302,7 @@ public class AVATest
      * Test serialization of a simple ATAV
      */
     @Test
-    public void testNullAtavSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullAtavSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA();
 
@@ -324,7 +322,7 @@ public class AVATest
 
 
     @Test
-    public void testNullNormValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullNormValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "test", (String)null );
 
@@ -345,7 +343,7 @@ public class AVATest
 
 
     @Test
-    public void testNullUpValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullUpValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", null, "test" );
 
@@ -366,7 +364,7 @@ public class AVATest
 
 
     @Test
-    public void testEmptyNormValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyNormValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "test", "" );
 
@@ -387,7 +385,7 @@ public class AVATest
 
 
     @Test
-    public void testEmptyUpValueSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyUpValueSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "", "test" );
 
@@ -411,7 +409,7 @@ public class AVATest
      * Test serialization of a simple ATAV
      */
     @Test
-    public void testStringAtavStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testStringAtavStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "cn", "CN", "test", "Test" );
 
@@ -435,7 +433,7 @@ public class AVATest
 
 
     @Test
-    public void testBinaryAtavStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testBinaryAtavStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         byte[] upValue = StringTools.getBytesUtf8( "  Test  " );
         byte[] normValue = StringTools.getBytesUtf8( "Test" );
@@ -465,7 +463,7 @@ public class AVATest
      * Test static serialization of a simple ATAV
      */
     @Test
-    public void testNullAtavStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullAtavStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA();
 
@@ -485,7 +483,7 @@ public class AVATest
 
 
     @Test
-    public void testNullNormValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullNormValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "test", (String)null );
 
@@ -506,7 +504,7 @@ public class AVATest
 
 
     @Test
-    public void testNullUpValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testNullUpValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", null, "test" );
 
@@ -527,7 +525,7 @@ public class AVATest
 
 
     @Test
-    public void testEmptyNormValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyNormValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "test", "" );
 
@@ -549,7 +547,7 @@ public class AVATest
 
 
     @Test
-    public void testEmptyUpValueStaticSerialization() throws NamingException, IOException, ClassNotFoundException
+    public void testEmptyUpValueStaticSerialization() throws LdapException, IOException, ClassNotFoundException
     {
         AVA atav = new AVA( "CN", "cn", "", "test" );
 



Mime
View raw message