directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209125 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java
Date Mon, 04 Jul 2005 21:12:53 GMT
Author: elecharny
Date: Mon Jul  4 14:12:51 2005
New Revision: 209125

URL: http://svn.apache.org/viewcvs?rev=209125&view=rev
Log:
- Polished the JavaDoc
- Fixed a bug in the test of the MessageID checking

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java?rev=209125&r1=209124&r2=209125&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AbandonRequestTest.java
Mon Jul  4 14:12:51 2005
@@ -30,6 +30,8 @@
 import junit.framework.TestCase;
 
 /**
+ * Test an AbandonRequest
+ * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public class AbandonRequestTest extends TestCase {
@@ -53,17 +55,17 @@
             new byte[]
             {
                 0x30, 0x06, 		// LDAPMessage ::=SEQUENCE {
-				0x02, 0x01, 0x01, 	//         messageID MessageID
-				0x50, 0x01, 0x01	//        CHOICE { ..., abandonRequest AbandonRequest,...
+				0x02, 0x01, 0x03, 	//        messageID MessageID
+				0x50, 0x01, 0x02	//        CHOICE { ..., abandonRequest AbandonRequest,...
 									// AbandonRequest ::= [APPLICATION 16] MessageID
-									// The MessageId value is 1.
             } );
 
         stream.flip();
 
-        // Allocate a BindRequest Container
+        // Allocate a LdapMessageContainer Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode the PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );
@@ -74,9 +76,11 @@
             Assert.fail( de.getMessage() );
         }
     	
+        // Check that everything is OK
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         AbandonRequest abandonRequest = ( AbandonRequest ) ( message.getProtocolOp() );
 
-        Assert.assertEquals( 1, abandonRequest.getMessageId() );
+        Assert.assertEquals( 3, message.getMessageId() );
+        Assert.assertEquals( 2, abandonRequest.getMessageId() );
     }
 }



Mime
View raw message