| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014-2015 ForgeRock AS. |
| | | * Portions Copyright 2014-2016 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.plugins; |
| | | |
| | |
| | | |
| | | import org.opends.server.TestCaseUtils; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.opends.server.tools.LDAPModify; |
| | | import com.forgerock.opendj.ldap.tools.LDAPModify; |
| | | |
| | | import static org.testng.Assert.*; |
| | | |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | |
| | | |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | |
| | | |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | |
| | | |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | |
| | | |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), ResultCode.CONSTRAINT_VIOLATION.intValue()); |
| | | } |
| | | finally |
| | | { |
| | |
| | | "-f", path |
| | | }; |
| | | |
| | | assertEquals(LDAPModify.mainModify(args, false, System.out, System.err), |
| | | 0); |
| | | assertEquals(LDAPModify.run(System.out, System.err, args), 0); |
| | | } |
| | | finally |
| | | { |