directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r764131 [10/16] - in /directory: apacheds/trunk/ apacheds/trunk/core-avl/ apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltree/ apacheds/trunk/core-avl/src/test/java/org/apache/directory/server/core/avltree/ apache...
Date Sat, 11 Apr 2009 01:03:25 GMT
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelResponseTest.java Sat Apr 11 01:03:00 2009
@@ -27,15 +27,17 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.del.DelResponse;
+import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DelResponseTest extends TestCase
+public class DelResponseTest
 {
     /**
      * Test the decoding of a DelResponse
      */
+    @Test
     public void testDecodeDelResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -89,8 +92,8 @@
         }
 
         // Check the decoded DelResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        DelResponse delResponse = message.getDelResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        DelResponseCodec delResponse = message.getDelResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.ALIAS_PROBLEM, delResponse.getLdapResult().getResultCode() );
@@ -120,6 +123,7 @@
     /**
      * Test the decoding of a DelResponse with no LdapResult
      */
+    @Test
     public void testDecodeDelResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -155,6 +159,7 @@
     /**
      * Test the decoding of a DelResponse with controls
      */
+    @Test
     public void testDecodeDelResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -200,8 +205,8 @@
         }
 
         // Check the decoded DelResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        DelResponse delResponse = message.getDelResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        DelResponseCodec delResponse = message.getDelResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.ALIAS_PROBLEM, delResponse.getLdapResult().getResultCode() );
@@ -212,11 +217,11 @@
         assertEquals( 0x4A, message.computeLength() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedRequestTest.java Sat Apr 11 01:03:00 2009
@@ -27,14 +27,17 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedRequest;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -42,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedRequestTest extends TestCase
+public class ExtendedRequestTest
 {
     /**
      * Test the decoding of a full ExtendedRequest
      */
+    @Test
     public void testDecodeExtendedRequestSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -83,8 +87,8 @@
         }
 
         // Check the decoded ExtendedRequest PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedRequest extendedRequest = message.getExtendedRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedRequestCodec extendedRequest = message.getExtendedRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -113,6 +117,7 @@
     /**
      * Test the decoding of a full ExtendedRequest with controls
      */
+    @Test
     public void testDecodeExtendedRequestWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -154,19 +159,19 @@
         }
 
         // Check the decoded ExtendedRequest PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedRequest extendedRequest = message.getExtendedRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedRequestCodec extendedRequest = message.getExtendedRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
         assertEquals( "value", StringTools.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -194,6 +199,7 @@
      * Test the decoding of a full ExtendedRequest with no value and with
      * controls
      */
+    @Test
     public void testDecodeExtendedRequestNoValueWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -235,19 +241,19 @@
         }
 
         // Check the decoded ExtendedRequest PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedRequest extendedRequest = message.getExtendedRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedRequestCodec extendedRequest = message.getExtendedRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
         assertEquals( "", StringTools.utf8ToString( extendedRequest.getRequestValue() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -274,6 +280,7 @@
     /**
      * Test the decoding of an empty ExtendedRequest
      */
+    @Test
     public void testDecodeExtendedRequestEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -309,6 +316,7 @@
     /**
      * Test the decoding of an empty OID
      */
+    @Test
     public void testDecodeEmptyOID()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -344,6 +352,7 @@
     /**
      * Test the decoding of a bad name 
      */
+    @Test
     public void testDecodeExtendedBadRequestName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -381,6 +390,7 @@
     /**
      * Test the decoding of a name only ExtendedRequest
      */
+    @Test
     public void testDecodeExtendedRequestName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -416,8 +426,8 @@
         }
 
         // Check the decoded ExtendedRequest PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedRequest extendedRequest = message.getExtendedRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedRequestCodec extendedRequest = message.getExtendedRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );
@@ -445,6 +455,7 @@
     /**
      * Test the decoding of an empty name ExtendedRequest
      */
+    @Test
     public void testDecodeExtendedRequestEmptyName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -481,8 +492,8 @@
         }
 
         // Check the decoded ExtendedRequest PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedRequest extendedRequest = message.getExtendedRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedRequestCodec extendedRequest = message.getExtendedRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", extendedRequest.getRequestName() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/ExtendedResponseTest.java Sat Apr 11 01:03:00 2009
@@ -27,15 +27,18 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponse;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -43,11 +46,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedResponseTest extends TestCase
+public class ExtendedResponseTest
 {
     /**
      * Test the decoding of a full ExtendedResponse
      */
+    @Test
     public void testDecodeExtendedResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -90,8 +94,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -123,6 +127,7 @@
     /**
      * Test the decoding of a full ExtendedResponse with controls
      */
+    @Test
     public void testDecodeExtendedResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -175,8 +180,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -186,11 +191,11 @@
         assertEquals( "value", StringTools.utf8ToString( ( byte[] ) extendedResponse.getResponse() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -217,6 +222,7 @@
     /**
      * Test the decoding of a ExtendedRequest with no name
      */
+    @Test
     public void testDecodeExtendedRequestNoName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -257,8 +263,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -288,6 +294,7 @@
     /**
      * Test the decoding of a ExtendedRequest with no name and a control
      */
+    @Test
     public void testDecodeExtendedRequestNoNameWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -330,8 +337,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -339,11 +346,11 @@
         assertEquals( "", extendedResponse.getLdapResult().getErrorMessage() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -370,6 +377,7 @@
     /**
      * Test the decoding of an empty ExtendedResponse
      */
+    @Test
     public void testDecodeExtendedResponseEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -404,6 +412,7 @@
     /**
      * Test the decoding of an ExtendedResponse with an empty ResponseName
      */
+    @Test
     public void testDecodeExtendedResponseEmptyResponseName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -447,6 +456,7 @@
     /**
      * Test the decoding of an ExtendedResponse with a bad responseName
      */
+    @Test
     public void testDecodeExtendedResponseBadOIDResponseName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -490,6 +500,7 @@
     /**
      * Test the decoding of an ExtendedResponse with no response
      */
+    @Test
     public void testDecodeExtendedResponseNoResponse()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -530,8 +541,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -563,6 +574,7 @@
     /**
      * Test the decoding of an ExtendedResponse with no response with controls
      */
+    @Test
     public void testDecodeExtendedResponseNoResponseWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -606,8 +618,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -617,11 +629,11 @@
         assertEquals( "", StringTools.utf8ToString( ( byte[] ) extendedResponse.getResponse() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -648,6 +660,7 @@
     /**
      * Test the decoding of an ExtendedResponse with an empty response
      */
+    @Test
     public void testDecodeExtendedResponseEmptyResponse()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -689,8 +702,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -723,6 +736,7 @@
      * Test the decoding of an ExtendedResponse with an empty response with
      * controls
      */
+    @Test
     public void testDecodeExtendedResponseEmptyResponseWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -766,8 +780,8 @@
         }
 
         // Check the decoded ExtendedResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ExtendedResponse extendedResponse = message.getExtendedResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ExtendedResponseCodec extendedResponse = message.getExtendedResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, extendedResponse.getLdapResult().getResultCode() );
@@ -777,11 +791,11 @@
         assertEquals( "", StringTools.utf8ToString( ( byte[] ) extendedResponse.getResponse() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/CertGenerationRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/CertGenerationRequestTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/CertGenerationRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/CertGenerationRequestTest.java Sat Apr 11 01:03:00 2009
@@ -31,6 +31,8 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
+import org.apache.directory.shared.ldap.codec.extended.operations.certGeneration.CertGenerationContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.certGeneration.CertGenerationObject;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulDisconnectTest.java Sat Apr 11 01:03:00 2009
@@ -25,14 +25,15 @@
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.extended.operations.GracefulDisconnect;
-import org.apache.directory.shared.ldap.codec.extended.operations.GracefulDisconnectContainer;
-import org.apache.directory.shared.ldap.codec.extended.operations.GracefulDisconnectDecoder;
+import org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnect;
+import org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnectContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.gracefulDisconnect.GracefulDisconnectDecoder;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 
 /**
@@ -40,7 +41,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulDisconnectTest extends TestCase
+public class GracefulDisconnectTest
 {
     /**
      * Test the decoding of a GracefulDisconnect
@@ -76,7 +77,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
@@ -132,7 +133,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
@@ -186,7 +187,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
@@ -241,7 +242,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
@@ -303,7 +304,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();
@@ -358,7 +359,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulDisconnect gracefulDisconnect = container.getGracefulDisconnect();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/GracefulShutdownTest.java Sat Apr 11 01:03:00 2009
@@ -26,13 +26,14 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.extended.operations.GracefulShutdown;
-import org.apache.directory.shared.ldap.codec.extended.operations.GracefulShutdownContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.gracefulShutdown.GracefulShutdown;
+import org.apache.directory.shared.ldap.codec.extended.operations.gracefulShutdown.GracefulShutdownContainer;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.junit.Test;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -40,7 +41,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GracefulShutdownTest extends TestCase
+public class GracefulShutdownTest
 {
     /**
      * Test the decoding of a GracefulShutdown
@@ -70,7 +71,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -122,7 +123,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -175,7 +176,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -226,7 +227,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -280,7 +281,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -334,7 +335,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();
@@ -390,7 +391,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         GracefulShutdown gracefulShutdown = container.getGracefulShutdown();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/extended/operations/StoredProcedureTest.java Sat Apr 11 01:03:00 2009
@@ -23,15 +23,18 @@
 
 import java.nio.ByteBuffer;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
 import org.apache.directory.shared.asn1.ber.Asn1Decoder;
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.extended.operations.StoredProcedure.StoredProcedureParameter;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureContainer;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedureDecoder;
+import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure.StoredProcedureParameter;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
 
 
 /*
@@ -39,8 +42,9 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class StoredProcedureTest extends TestCase
+public class StoredProcedureTest
 {
+	@Test
     public void testDecodeStoredProcedureNParams()
     {
         Asn1Decoder storedProcedureDecoder = new StoredProcedureDecoder();
@@ -78,31 +82,31 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         StoredProcedure storedProcedure = ( ( StoredProcedureContainer ) storedProcedureContainer ).getStoredProcedure();
 
-        Assert.assertEquals("Java", storedProcedure.getLanguage());
+        assertEquals("Java", storedProcedure.getLanguage());
         
-        Assert.assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
+        assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
 
-        Assert.assertEquals( 3, storedProcedure.getParameters().size() );
+        assertEquals( 3, storedProcedure.getParameters().size() );
 
         StoredProcedureParameter param = storedProcedure.getParameters().get( 0 );
 
-        Assert.assertEquals( "int", StringTools.utf8ToString( param.getType() ) );
-        Assert.assertEquals( 1, param.getValue()[0] );
+        assertEquals( "int", StringTools.utf8ToString( param.getType() ) );
+        assertEquals( 1, param.getValue()[0] );
 
         param = storedProcedure.getParameters().get( 1 );
 
-        Assert.assertEquals( "boolean", StringTools.utf8ToString( param.getType() ) );
-        Assert.assertEquals( "true", StringTools.utf8ToString( param.getValue() ) );
+        assertEquals( "boolean", StringTools.utf8ToString( param.getType() ) );
+        assertEquals( "true", StringTools.utf8ToString( param.getValue() ) );
 
         param = storedProcedure.getParameters().get( 2 );
 
-        Assert.assertEquals( "String", StringTools.utf8ToString( param.getType() ) );
-        Assert.assertEquals( "parameter3", StringTools.utf8ToString( param.getValue() ) );
+        assertEquals( "String", StringTools.utf8ToString( param.getType() ) );
+        assertEquals( "parameter3", StringTools.utf8ToString( param.getValue() ) );
 
         // Check the encoding
         try
@@ -120,6 +124,7 @@
         }
     }
 
+	@Test
     public void testDecodeStoredProcedureNoParam()
     {
         Asn1Decoder storedProcedureDecoder = new StoredProcedureDecoder();
@@ -148,16 +153,16 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         StoredProcedure storedProcedure = ( ( StoredProcedureContainer ) storedProcedureContainer ).getStoredProcedure();
 
-        Assert.assertEquals("Java", storedProcedure.getLanguage());
+        assertEquals("Java", storedProcedure.getLanguage());
         
-        Assert.assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
+        assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
 
-        Assert.assertEquals( 0, storedProcedure.getParameters().size() );
+        assertEquals( 0, storedProcedure.getParameters().size() );
         
         // Check the encoding
         try
@@ -175,6 +180,8 @@
         }
     }
 
+	
+	@Test
     public void testDecodeStoredProcedureOneParam()
     {
         Asn1Decoder storedProcedureDecoder = new StoredProcedureDecoder();
@@ -206,21 +213,21 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         StoredProcedure storedProcedure = ( ( StoredProcedureContainer ) storedProcedureContainer ).getStoredProcedure();
 
-        Assert.assertEquals("Java", storedProcedure.getLanguage());
+        assertEquals("Java", storedProcedure.getLanguage());
         
-        Assert.assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
+        assertEquals( "execute", StringTools.utf8ToString( storedProcedure.getProcedure() ) );
 
-        Assert.assertEquals( 1, storedProcedure.getParameters().size() );
+        assertEquals( 1, storedProcedure.getParameters().size() );
 
         StoredProcedureParameter param = storedProcedure.getParameters().get( 0 );
 
-        Assert.assertEquals( "int", StringTools.utf8ToString( param.getType() ) );
-        Assert.assertEquals( 1, param.getValue()[0] );
+        assertEquals( "int", StringTools.utf8ToString( param.getType() ) );
+        assertEquals( 1, param.getValue()[0] );
 
         // Check the encoding
         try

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseTest.java Sat Apr 11 01:03:00 2009
@@ -27,13 +27,15 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -41,11 +43,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class IntermediateResponseTest extends TestCase
+public class IntermediateResponseTest
 {
     /**
      * Test the decoding of a full IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -82,8 +85,8 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
@@ -112,6 +115,7 @@
     /**
      * Test the decoding of a full IntermediateResponse with controls
      */
+    @Test
     public void testDecodeIntermediateResponseWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -153,19 +157,19 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
         assertEquals( "value", StringTools.utf8ToString( intermediateResponse.getResponseValue() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -193,6 +197,7 @@
      * Test the decoding of a full IntermediateResponse with no value and with
      * controls
      */
+    @Test
     public void testDecodeIntermediateResponseNoValueWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -234,19 +239,19 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
         assertEquals( "", StringTools.utf8ToString( intermediateResponse.getResponseValue() ) );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -273,6 +278,7 @@
     /**
      * Test the decoding of an empty IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -308,6 +314,7 @@
     /**
      * Test the decoding of an empty OID
      */
+    @Test
     public void testDecodeEmptyOID()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -343,6 +350,7 @@
     /**
      * Test the decoding of a bad name 
      */
+    @Test
     public void testDecodeExtendedBadRequestName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -380,6 +388,7 @@
     /**
      * Test the decoding of a name only IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -415,8 +424,8 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
@@ -444,6 +453,7 @@
     /**
      * Test the decoding of an empty value IntermediateResponse
      */
+    @Test
     public void testDecodeIntermediateResponseEmptyValue()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -480,8 +490,8 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );
@@ -510,6 +520,7 @@
     /**
      * Test the decoding of an IntermediateResponse without name
      */
+    @Test
     public void testDecodeIntermediateResponseNoName()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -544,8 +555,8 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "", intermediateResponse.getResponseName() );
@@ -574,6 +585,7 @@
     /**
      * Test the decoding of an IntermediateResponse with no value
      */
+    @Test
     public void testDecodeIntermediateResponseNoValue()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -608,8 +620,8 @@
         }
 
         // Check the decoded IntermediateResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        IntermediateResponse intermediateResponse = message.getIntermediateResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        IntermediateResponseCodec intermediateResponse = message.getIntermediateResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "1.3.6.1.5.5.2", intermediateResponse.getResponseName() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java Sat Apr 11 01:03:00 2009
@@ -29,20 +29,22 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequest;
+import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.message.InternalMessage;
 import org.apache.directory.shared.ldap.message.ModifyResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -50,11 +52,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyRequestTest extends TestCase
+public class ModifyRequestTest
 {
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequest2AttrsSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -114,8 +117,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString() );
@@ -162,6 +165,7 @@
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -216,7 +220,7 @@
         catch ( DecoderException de )
         {
             assertTrue( de instanceof ResponseCarryingException );
-            Message response = ((ResponseCarryingException)de).getResponse();
+            InternalMessage response = ((ResponseCarryingException)de).getResponse();
             assertTrue( response instanceof ModifyResponseImpl );
             assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ((ModifyResponseImpl)response).getLdapResult().getResultCode() );
             return;
@@ -228,6 +232,7 @@
     /**
      * Test the decoding of a ModifyRequest, with different operations
      */
+    @Test
     public void testDecodeModifyRequestManyOperations() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -282,8 +287,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 21, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString() );
@@ -327,7 +332,7 @@
                 fail( de.getMessage() );
             }
 
-            LdapMessage message2 = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+            LdapMessageCodec message2 = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
 
             ByteBuffer bb2 = message2.encode( null );
             String decodedPdu2 = StringTools.dumpBytes( bb2.array() );
@@ -345,6 +350,7 @@
     /**
      * Test the decoding of a ModifyRequest, with different operations, take 2
      */
+    @Test
     public void testDecodeModifyRequestManyOperations2() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -405,8 +411,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=Tori Amos,ou=playground,dc=apache,dc=org", modifyRequest.getObject().toString() );
@@ -459,7 +465,7 @@
                 fail( de.getMessage() );
             }
 
-            LdapMessage message2 = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+            LdapMessageCodec message2 = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
 
             ByteBuffer bb2 = message2.encode( null );
             String decodedPdu2 = StringTools.dumpBytes( bb2.array() );
@@ -477,6 +483,7 @@
     /**
      * Test the decoding of a ModifyRequest
      */
+    @Test
     public void testDecodeModifyRequest2Attrs3valsSuccess() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -536,8 +543,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString() );
@@ -590,6 +597,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty body
      */
+    @Test
     public void testDecodeModifyRequestEmptyBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -624,6 +632,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty object
      */
+    @Test
     public void testDecodeModifyRequestEmptyObject()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -659,6 +668,7 @@
     /**
      * Test the decoding of a ModifyRequest with an object and nothing else
      */
+    @Test
     public void testDecodeModifyRequestObjectAlone()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -696,6 +706,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty modification
      */
+    @Test
     public void testDecodeModifyRequestEmptyModification()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -734,6 +745,7 @@
     /**
      * Test the decoding of a ModifyRequest with an empty operation
      */
+    @Test
     public void testDecodeModifyRequestEmptyOperation()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -773,6 +785,7 @@
     /**
      * Test the decoding of a ModifyRequest with an wrong empty operation
      */
+    @Test
     public void testDecodeModifyRequestWrongOperationEmpty()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -813,6 +826,7 @@
     /**
      * Test the decoding of a ModifyRequest with an wrong operation
      */
+    @Test
     public void testDecodeModifyRequestWrongOperation()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -854,6 +868,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and nothing
      * more
      */
+    @Test
     public void testDecodeModifyRequestAddOperationEnd()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -895,6 +910,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and an empty
      * modification
      */
+    @Test
     public void testDecodeModifyRequestAddOperationEmptyModification()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -937,6 +953,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with an empty type
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationEmptyType()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -972,7 +989,7 @@
         catch ( DecoderException de )
         {
             assertTrue( de instanceof ResponseCarryingException );
-            Message response = ((ResponseCarryingException)de).getResponse();
+            InternalMessage response = ((ResponseCarryingException)de).getResponse();
             assertTrue( response instanceof ModifyResponseImpl );
             assertEquals( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, ((ModifyResponseImpl)response).getLdapResult().getResultCode() );
             return;
@@ -984,6 +1001,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and no vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeNoVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1027,6 +1045,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and an empty vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeEmptyVals()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1067,8 +1086,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString() );
@@ -1107,6 +1126,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and an empty vals wuth controls
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationTypeEmptyValsWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1150,8 +1170,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString() );
@@ -1167,11 +1187,11 @@
         assertEquals( 0, attributeValue.size() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -1199,6 +1219,7 @@
      * Test the decoding of a ModifyRequest with an add operation, and a
      * modification with a type and two vals
      */
+    @Test
     public void testDecodeModifyRequestAddOperationModificationType2Vals() throws NamingException
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -1241,8 +1262,8 @@
         }
 
         // Check the decoded PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyRequest modifyRequest = message.getModifyRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyRequestCodec modifyRequest = message.getModifyRequest();
 
         assertEquals( 49, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyRequest.getObject().toString() );

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseTest.java Sat Apr 11 01:03:00 2009
@@ -27,15 +27,17 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.modify.ModifyResponse;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyResponseTest extends TestCase
+public class ModifyResponseTest
 {
     /**
      * Test the decoding of a ModifyResponse
      */
+    @Test
     public void testDecodeModifyResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -87,8 +90,8 @@
         }
 
         // Check the decoded ModifyResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyResponse modifyResponse = message.getModifyResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyResponseCodec modifyResponse = message.getModifyResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, modifyResponse.getLdapResult().getResultCode() );
@@ -118,6 +121,7 @@
     /**
      * Test the decoding of a ModifyResponse with controls
      */
+    @Test
     public void testDecodeModifyResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -159,8 +163,8 @@
         }
 
         // Check the decoded ModifyResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyResponse modifyResponse = message.getModifyResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyResponseCodec modifyResponse = message.getModifyResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, modifyResponse.getLdapResult().getResultCode() );
@@ -168,11 +172,11 @@
         assertEquals( "", modifyResponse.getLdapResult().getErrorMessage() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -199,6 +203,7 @@
     /**
      * Test the decoding of a ModifyResponse with no LdapResult
      */
+    @Test
     public void testDecodeModifyResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java Sat Apr 11 01:03:00 2009
@@ -27,18 +27,20 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.ResponseCarryingException;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequest;
-import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
+import org.apache.directory.shared.ldap.message.InternalMessage;
 import org.apache.directory.shared.ldap.message.ModifyDnResponseImpl;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -46,11 +48,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDNRequestTest extends TestCase
+public class ModifyDNRequestTest
 {
     /**
      * Test the decoding of a full ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -93,8 +96,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNRequest modifyDNRequest = message.getModifyDNRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNRequestCodec modifyDNRequest = message.getModifyDNRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyDNRequest.getEntry().toString() );
@@ -124,6 +127,7 @@
     /**
      * Test the decoding of a bad DN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -162,7 +166,7 @@
         catch ( DecoderException de )
         {
             assertTrue( de instanceof ResponseCarryingException );
-            Message response = ((ResponseCarryingException)de).getResponse();
+            InternalMessage response = ((ResponseCarryingException)de).getResponse();
             assertTrue( response instanceof ModifyDnResponseImpl );
             assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ((ModifyDnResponseImpl)response).getLdapResult().getResultCode() );
             return;
@@ -174,6 +178,7 @@
     /**
      * Test the decoding of a bad RDN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadRDN()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -212,7 +217,7 @@
         catch ( DecoderException de )
         {
             assertTrue( de instanceof ResponseCarryingException );
-            Message response = ((ResponseCarryingException)de).getResponse();
+            InternalMessage response = ((ResponseCarryingException)de).getResponse();
             assertTrue( response instanceof ModifyDnResponseImpl );
             assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ((ModifyDnResponseImpl)response).getLdapResult().getResultCode() );
             return;
@@ -224,6 +229,7 @@
     /**
      * Test the decoding of a bad RDN ModifyDNRequest
      */
+    @Test
     public void testDecodeModifyDNRequestBadNewSuperior()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -262,7 +268,7 @@
         catch ( DecoderException de )
         {
             assertTrue( de instanceof ResponseCarryingException );
-            Message response = ((ResponseCarryingException)de).getResponse();
+            InternalMessage response = ((ResponseCarryingException)de).getResponse();
             assertTrue( response instanceof ModifyDnResponseImpl );
             assertEquals( ResultCodeEnum.INVALID_DN_SYNTAX, ((ModifyDnResponseImpl)response).getLdapResult().getResultCode() );
             return;
@@ -274,6 +280,7 @@
     /**
      * Test the decoding of a full ModifyDNRequest with controls
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -319,8 +326,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNRequest modifyDNRequest = message.getModifyDNRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNRequestCodec modifyDNRequest = message.getModifyDNRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyDNRequest.getEntry().toString() );
@@ -329,11 +336,11 @@
         assertEquals( "ou=system", modifyDNRequest.getNewSuperior().toString() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -360,6 +367,7 @@
     /**
      * Test the decoding of a ModifyDNRequest without a superior
      */
+    @Test
     public void testDecodeModifyDNRequestWithoutSuperior()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -400,8 +408,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNRequest modifyDNRequest = message.getModifyDNRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNRequestCodec modifyDNRequest = message.getModifyDNRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyDNRequest.getEntry().toString() );
@@ -431,6 +439,7 @@
     /**
      * Test the decoding of a ModifyDNRequest without a superior with controls
      */
+    @Test
     public void testDecodeModifyDNRequestWithoutSuperiorWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -474,8 +483,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNRequest modifyDNRequest = message.getModifyDNRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNRequestCodec modifyDNRequest = message.getModifyDNRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "cn=testModify,ou=users,ou=system", modifyDNRequest.getEntry().toString() );
@@ -483,11 +492,11 @@
         assertEquals( "cn=testDNModify", modifyDNRequest.getNewRDN().toString() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -516,6 +525,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty body
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyBody()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -551,6 +561,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty entry
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyEntry()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -586,6 +597,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty newRdn
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyNewRdn()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -625,6 +637,7 @@
     /**
      * Test the decoding of a ModifyDNRequest with an empty deleteOldRdn
      */
+    @Test
     public void testDecodeModifyDNRequestEmptyDeleteOldRdnn()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseTest.java Sat Apr 11 01:03:00 2009
@@ -27,15 +27,17 @@
 import org.apache.directory.shared.asn1.ber.IAsn1Container;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.Control;
+import org.apache.directory.shared.ldap.codec.ControlCodec;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponse;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -43,11 +45,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ModifyDNResponseTest extends TestCase
+public class ModifyDNResponseTest
 {
     /**
      * Test the decoding of a ModifyDNResponse
      */
+    @Test
     public void testDecodeModifyResponseSuccess()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -88,8 +91,8 @@
         }
 
         // Check the decoded ModifyDNResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNResponse modifyDNResponse = message.getModifyDNResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNResponseCodec modifyDNResponse = message.getModifyDNResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, modifyDNResponse.getLdapResult().getResultCode() );
@@ -119,6 +122,7 @@
     /**
      * Test the decoding of a ModifyDNResponse with controls
      */
+    @Test
     public void testDecodeModifyResponseSuccessWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -161,8 +165,8 @@
         }
 
         // Check the decoded ModifyDNResponse PDU
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        ModifyDNResponse modifyDNResponse = message.getModifyDNResponse();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        ModifyDNResponseCodec modifyDNResponse = message.getModifyDNResponse();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( ResultCodeEnum.SUCCESS, modifyDNResponse.getLdapResult().getResultCode() );
@@ -170,11 +174,11 @@
         assertEquals( "", modifyDNResponse.getLdapResult().getErrorMessage() );
 
         // Check the Control
-        List<Control> controls = message.getControls();
+        List<ControlCodec> controls = message.getControls();
 
         assertEquals( 1, controls.size() );
 
-        Control control = message.getControls( 0 );
+        ControlCodec control = message.getControls( 0 );
         assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getControlValue() ) );
 
@@ -201,6 +205,7 @@
     /**
      * Test the decoding of a ModifyDNResponse with no LdapResult
      */
+    @Test
     public void testDecodeModifyDNResponseEmptyResult()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java?rev=764131&r1=764130&r2=764131&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java Sat Apr 11 01:03:00 2009
@@ -31,10 +31,10 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapDecoder;
-import org.apache.directory.shared.ldap.codec.LdapMessage;
+import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
-import org.apache.directory.shared.ldap.codec.search.SearchRequest;
+import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.schema.normalizers.DeepTrimToLowerNormalizer;
@@ -42,8 +42,12 @@
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.BeforeClass;
 import org.junit.Test;
-
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 
 /**
@@ -51,15 +55,13 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SearchRequestMatchingRuleAssertionTest extends TestCase
+public class SearchRequestMatchingRuleAssertionTest
 {
     static Map<String, OidNormalizer> oids = new HashMap<String, OidNormalizer>();
 
     @BeforeClass
-    protected void setUp() throws Exception
+    public static void setUp() throws Exception
     {
-        super.setUp();
-
         oids.put( "dc", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "domaincomponent", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
         oids.put( "0.9.2342.19200300.100.1.25", new OidNormalizer( "dc", new DeepTrimToLowerNormalizer() ) );
@@ -133,8 +135,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        SearchRequest sr = message.getSearchRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        SearchRequestCodec sr = message.getSearchRequest();
 
         assertEquals( 1, message.getMessageId() );
         assertEquals( "dc=example,dc=com", sr.getBaseObject().toString() );
@@ -369,8 +371,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        SearchRequest sr = message.getSearchRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        SearchRequestCodec sr = message.getSearchRequest();
 
         assertEquals( 4, message.getMessageId() );
         assertEquals( "uid=akarasulu,dc=example,dc=com", sr.getBaseObject().toString() );
@@ -656,8 +658,8 @@
             fail( de.getMessage() );
         }
 
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        SearchRequest sr = message.getSearchRequest();
+        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
+        SearchRequestCodec sr = message.getSearchRequest();
 
         assertEquals( 4, message.getMessageId() );
         assertEquals( "uid=akarasulu,dc=example,dc=com", sr.getBaseObject().toString() );



Mime
View raw message