Skip to content

Commit

Permalink
Implement missing increment case
Browse files Browse the repository at this point in the history
  • Loading branch information
seelmann committed May 15, 2021
1 parent 0d2e644 commit ca24ada
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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

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


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

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


Expand Down

0 comments on commit ca24ada

Please sign in to comment.