Skip to content
Permalink
Browse files
Implement missing increment case
  • Loading branch information
seelmann committed May 15, 2021
1 parent 0d2e644 commit ca24ada9b464a3dcbb0e07e0af7e00c75695aca4
Showing 2 changed files with 8 additions and 4 deletions.
@@ -502,6 +502,10 @@ public static String convertToLdif( LdifEntry entry, int length ) throws LdapExc
sb.append( "replace: " );
break;

case INCREMENT_ATTRIBUTE:
sb.append( "increment: " );
break;

default:
throw new IllegalArgumentException( I18n.err( I18n.ERR_13434_UNEXPECTED_MOD_OPERATION, modification.getOperation() ) );
}
@@ -33,10 +33,6 @@
import org.apache.directory.api.ldap.model.entry.Modification;
import org.apache.directory.api.ldap.model.entry.ModificationOperation;
import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
import org.apache.directory.api.ldap.model.ldif.ChangeType;
import org.apache.directory.api.ldap.model.ldif.LdapLdifException;
import org.apache.directory.api.ldap.model.ldif.LdifControl;
import org.apache.directory.api.ldap.model.ldif.LdifEntry;
import org.apache.directory.api.ldap.model.name.Dn;
import org.apache.directory.api.util.Strings;

@@ -607,6 +603,8 @@ public void testLdifEntryChangeTypeModifyIncrement() throws Exception
assertNotNull( attribute );
assertEquals( "uidnumber", attribute.getId() );
}

assertTrue( ldifEntry.toString().contains( ldif ) );
}


@@ -643,6 +641,8 @@ public void testLdifEntryChangeTypeModifyIncrementNumber() throws Exception
assertEquals( "uidnumber", attribute.getId() );
assertEquals( "3", attribute.getString() );
}

assertTrue( ldifEntry.toString().contains( ldif ) );
}


0 comments on commit ca24ada

Please sign in to comment.