/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2015 ForgeRock AS
*/
/**
* This class defines a set of tests for the
* org.opends.server.protocol.ldap.ModifyRequestProtocolOp class.
*/
{
/**
* The protocol op type for modify requests.
*/
/**
* The protocol op type for modify responses.
*/
/**
* The DN for modify requests in this test case.
*/
/**
* The alternative DN for add requests in this test case.
*/
/**
* Generate modifications for use in test cases. Attributes will have names
* like "testAttributeN" where N is the number of the attribute. Modification
* types will be random.
*
* @param numAttributes Number of attributes to generate. 0 will return
* a empty list.
* @param prefix String to prefix the attribute values
* @return The generate attributes.
*
*/
{
for(int i = 0; i < numAttributes; i++)
{
switch(i % 4)
{
break;
break;
break;
break;
}
}
return modifies;
}
{
{
return false;
}
{
{
return false;
}
{
return false;
}
}
return true;
}
/**
* Test to make sure the class processes the right LDAP op type.
*
* @throws Exception If the test failed unexpectedly.
*/
@Test
{
}
/**
* Test to make sure the class returns the correct protocol name.
*
* @throws Exception If the test failed unexpectedly.
*/
@Test
{
}
/**
* Test the constructors to make sure the right objects are constructed.
*
* @throws Exception If the test failed unexpectedly.
*/
@Test
{
//Test to make sure the constructor with dn param works.
//Test to make sure the constructor with dn and attribute params works.
//Test to make sure the constructor with dn and attribute params works with
//null attributes.
}
/**
* Test the decode method when an null element is passed
*
* @throws Exception If the test failed unexpectedly.
*/
{
}
/**
* Test the decode method when an empty element is passed
*
* @throws Exception If the test failed unexpectedly.
*/
{
}
/**
* Test the decode method when invalid modifies in element is passed
*
* @throws Exception If the test failed unexpectedly.
*/
{
}
/**
* Test the decode method when an element w/ wrong op type is passed.
*
* @throws Exception If the test failed unexpectedly.
*/
{
}
/**
* Test the encode and decode methods with null params
*
* @throws Exception If the test failed unexpectedly.
*/
{
}
/**
* Test the encode and decode methods and corner cases.
*
* @throws Exception If the test failed unexpectedly.
*/
@Test
{
//Test case for a full encode decode operation with normal params.
//Test case for a full encode decode operation with large modifications.
//Test case for a full encode decode operation with no attributes.
}
/**
* Test the toString (single line) method.
*
* @throws Exception If the test fails unexpectedly.
*/
@Test
{
int numModifications = 10;
for (int i = 0; i < numModifications; i++)
{
if(i < numModifications - 1)
{
}
}
}
/**
* Test the toString (multi line) method.
*
* @throws Exception If the test fails unexpectedly.
*/
@Test
{
int numModifications = 10;
int indent = 5;
for (int i = 0; i < indent; i++)
{
}
{
}
}
}