mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
19.51.2013 cc436fb6ca1ea44d70f62777855fd4f21b4e50bc
opendj-admin/src/test/java/org/opends/server/admin/client/ldap/CreateEntryMockLDAPConnection.java
@@ -34,10 +34,9 @@
import org.forgerock.opendj.ldap.DN;
import org.forgerock.opendj.ldap.Entry;
import org.forgerock.opendj.ldap.ErrorResultException;
import org.forgerock.util.Reject;
import org.testng.Assert;
import com.forgerock.opendj.util.Validator;
/**
 * A mock LDAP connection which is used to verify that an add operation was
 * requested and that it has the correct parameters.
@@ -73,9 +72,9 @@
     *            The attribute's expected values (never empty).
     */
    public void addExpectedAttribute(String expectedName, String... expectedValues) {
        Validator.ensureNotNull(expectedName);
        Validator.ensureNotNull(expectedValues);
        Validator.ensureTrue(expectedValues.length > 0, "should have at least one expected value");
        Reject.ifNull(expectedName);
        Reject.ifNull(expectedValues);
        Reject.ifFalse(expectedValues.length > 0, "should have at least one expected value");
        attributes.put(expectedName, Arrays.asList(expectedValues));
    }