directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r348436 - /directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
Date Wed, 23 Nov 2005 13:35:34 GMT
Author: elecharny
Date: Wed Nov 23 05:35:29 2005
New Revision: 348436

URL: http://svn.apache.org/viewcvs?rev=348436&view=rev
Log:
Fixed the test accordingly to the modification done in Controls

Modified:
    directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java

Modified: directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java?rev=348436&r1=348435&r2=348436&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
(original)
+++ directory/shared/ldap/trunk/apache2-provider/src/test/org/apache/asn1new/ldap/codec/AbandonRequestTest.java
Wed Nov 23 05:35:29 2005
@@ -102,33 +102,32 @@
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
 
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x48 );
+        ByteBuffer  stream      = ByteBuffer.allocate( 0x64 );
         stream.put(
             new byte[]
             {
-                0x30, 0x46,         // LDAPMessage ::=SEQUENCE {
+                0x30, 0x62,         // LDAPMessage ::=SEQUENCE {
                 0x02, 0x01, 0x03,   //        messageID MessageID
                 0x50, 0x01, 0x02,    //        CHOICE { ..., abandonRequest AbandonRequest,...
-                (byte)0xA0, 0x3E,   //    controls       [0] Controls OPTIONAL }
-                //0x30, 0x3E,         // Controls ::= SEQUENCE OF Control
-                0x30, 0x13,         // Control ::= SEQUENCE {
+                (byte)0xA0, 0x5A,   //    controls       [0] Controls OPTIONAL }
+                0x30, 0x1A,         // Control ::= SEQUENCE {
                                     //    controlType             LDAPOID, 
-                0x04, 0x06, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x01,
+                0x04, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '1',
                 0x01, 0x01, (byte)0xFF,   //    criticality             BOOLEAN DEFAULT FALSE,
                                     //    controlValue            OCTET STRING OPTIONAL }
                 0x04, 0x06, 'a', 'b', 'c', 'd', 'e', 'f',
-                0x30, 0x10,         // Control ::= SEQUENCE {
+                0x30, 0x17,         // Control ::= SEQUENCE {
                                     //    controlType             LDAPOID, 
-                0x04, 0x06, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02,
+                0x04, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '2',
                                     //    controlValue            OCTET STRING OPTIONAL }
                 0x04, 0x06, 'g', 'h', 'i', 'j', 'k', 'l',
-                0x30, 0x0B,         // Control ::= SEQUENCE {
+                0x30, 0x12,         // Control ::= SEQUENCE {
                                     //    controlType             LDAPOID, 
-                0x04, 0x06, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x03,
+                0x04, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '3',
                 0x01, 0x01, (byte)0xFF,   //    criticality             BOOLEAN DEFAULT FALSE}
-                0x30, 0x08,         // Control ::= SEQUENCE {
+                0x30, 0x0F,         // Control ::= SEQUENCE {
                                     //    controlType             LDAPOID} 
-                0x04, 0x06, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x04
+                0x04, 0x0D, '1', '.', '3', '.', '6', '.', '1', '.', '5', '.', '5', '.', '4'
             } );
 
         String decodedPdu = StringUtils.dumpBytes( stream.array() );
@@ -156,7 +155,7 @@
         Assert.assertEquals( 2, abandonRequest.getAbandonedMessageId() );
         
         // Check the length
-        Assert.assertEquals(0x48, message.computeLength());
+        Assert.assertEquals(0x64, message.computeLength());
         
         // Check the encoding
         try



Mime
View raw message