directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209330 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/BindResponseTest.java
Date Tue, 05 Jul 2005 22:09:37 GMT
Author: elecharny
Date: Tue Jul  5 15:09:36 2005
New Revision: 209330

URL: http://svn.apache.org/viewcvs?rev=209330&view=rev
Log:
Polishing the code and the comments

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/BindResponseTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/BindResponseTest.java?rev=209330&r1=209329&r2=209330&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/BindResponseTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/BindResponseTest.java
Tue Jul  5 15:09:36 2005
@@ -72,9 +72,10 @@
 
         stream.flip();
 
-        // Allocate a BindRequest Container
+        // Allocate a LdapMessage Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode the BindResponse PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );
@@ -85,8 +86,9 @@
             Assert.fail( de.getMessage() );
         }
     	
+        // Check the decoded BindResponse
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        BindResponse br      = ( BindResponse ) ( message.getProtocolOp() );
+        BindResponse br      = message.getBindResponse();
 
         Assert.assertEquals( 1, message.getMessageId() );
         Assert.assertEquals( 0, br.getLdapResult().getResultCode() );
@@ -95,7 +97,7 @@
     }
 
     /**
-     * Test the decoding of a BindResponse
+     * Test the decoding of a BindResponse with a credentials
      */
     public void testDecodeBindResponseServerSASL()
     {
@@ -125,9 +127,10 @@
 
         stream.flip();
 
-        // Allocate a BindRequest Container
+        // Allocate a LdapMessage Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode the BindResponse PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );
@@ -138,8 +141,9 @@
             Assert.fail( de.getMessage() );
         }
     	
+        // Check the decoded BindResponse
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        BindResponse br      = ( BindResponse ) ( message.getProtocolOp() );
+        BindResponse br      = message.getBindResponse();
 
         Assert.assertEquals( 1, message.getMessageId() );
         Assert.assertEquals( 0, br.getLdapResult().getResultCode() );



Mime
View raw message