directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1125906 - /directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Date Sun, 22 May 2011 10:53:18 GMT
Author: kayyagari
Date: Sun May 22 10:53:17 2011
New Revision: 1125906

URL: http://svn.apache.org/viewvc?rev=1125906&view=rev
Log:
o removed ignore annotation and added another assertion (DIRSERVER-1610)

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=1125906&r1=1125905&r2=1125906&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
Sun May 22 10:53:17 2011
@@ -90,6 +90,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.model.exception.LdapNoSuchAttributeException;
 import org.apache.directory.shared.ldap.model.exception.LdapOperationException;
 import org.apache.directory.shared.ldap.model.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
@@ -1385,7 +1386,6 @@ public class AddIT extends AbstractLdapT
      * @throws Exception 
      */
     @Test
-    @Ignore
     public void testAddEntryNonExistingAT() throws Exception
     {
         LdapConnection connection = ServerIntegrationUtils.getClientApiConnection( getLdapServer()
);
@@ -1399,7 +1399,15 @@ public class AddIT extends AbstractLdapT
         personEntry.add( "nonExistingAttribute", "value" );
         personEntry.setDn( dn );
 
-        connection.add( personEntry );
+        try
+        {
+            connection.add( personEntry );
+            fail("should throw LdapNoSuchAttributeException");
+        }
+        catch( LdapNoSuchAttributeException e )
+        {
+            //expected exception
+        }
 
         Entry entry = connection.lookup( dn );
         assertNull( entry );



Mime
View raw message