You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2017/12/06 04:20:34 UTC
svn commit: r1817261 -
/directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext
Author: elecharny
Date: Wed Dec 6 04:20:34 2017
New Revision: 1817261
URL: http://svn.apache.org/viewvc?rev=1817261&view=rev
Log:
Fixed the delete usage, which returns nothing, in the sample
Modified:
directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext
Modified: directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext?rev=1817261&r1=1817260&r2=1817261&view=diff
==============================================================================
--- directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext (original)
+++ directory/site/trunk/content/api/user-guide/2.5-deleting.mdtext Wed Dec 6 04:20:34 2017
@@ -36,9 +36,14 @@ We request a deletion by providing the e
{
assertTrue( session.exists( "cn=child1,cn=parent,ou=system" ) );
- DeleteResponse response = connection.delete( "cn=child1,cn=parent,ou=system" );
- assertNotNull( response );
- assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
+ try
+ {
+ connection.delete( "cn=child1,cn=parent,ou=system" );
+ }
+ catch ( LdapException le )
+ {
+ fail( le.getMessage() );
+ }
assertFalse( session.exists( "cn=child1,cn=parent,ou=system" ) );
}
@@ -52,9 +57,14 @@ Trying to delete a parent node would res
{
assertTrue( session.exists( "cn=parent,ou=system" ) );
- DeleteResponse response = connection.delete( "cn=parent,ou=system" );
- assertNotNull( response );
- assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_NON_LEAF, response.getLdapResult().getResultCode() );
+ try
+ {
+ connection.delete( "cn=parent,ou=system" );
+ }
+ catch ( LdapException le )
+ {
+ fail( le.getMessage() );
+ }
assertTrue( session.exists( "cn=parent,ou=system" ) );
}
@@ -71,9 +81,14 @@ Usually, you can't delete an entry and a
assertTrue( session.exists( "cn=parent,ou=system" ) );
- DeleteResponse response = connection.deleteTree( "cn=parent,ou=system" );
- assertNotNull( response );
- assertEquals( ResultCodeEnum.SUCCESS, response.getLdapResult().getResultCode() );
+ try
+ {
+ connection.deleteTree( "cn=parent,ou=system" );
+ }
+ catch ( LdapException le )
+ {
+ fail( le.getMessage() );
+ }
assertFalse( session.exists( "cn=parent,ou=system" ) );
}