directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209138 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AddResponseTest.java
Date Mon, 04 Jul 2005 22:38:04 GMT
Author: elecharny
Date: Mon Jul  4 15:38:02 2005
New Revision: 209138

URL: http://svn.apache.org/viewcvs?rev=209138&view=rev
Log:
- Polished the code

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AddResponseTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AddResponseTest.java?rev=209138&r1=209137&r2=209138&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AddResponseTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/AddResponseTest.java
Mon Jul  4 15:38:02 2005
@@ -71,9 +71,10 @@
 
         stream.flip();
 
-        // Allocate a BindRequest Container
+        // Allocate a LdapMessage Container
         IAsn1Container ldapMessageContainer = new LdapMessageContainer();
 
+        // Decode the AddResponse PDU
         try
         {
             ldapDecoder.decode( stream, ldapMessageContainer );
@@ -84,9 +85,10 @@
             Assert.fail( de.getMessage() );
         }
     	
+        // Check the decoded AddResponse
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        AddResponse addResponse      = ( AddResponse ) ( message.getProtocolOp() );
-
+        AddResponse addResponse      = message.getAddResponse();
+        
         Assert.assertEquals( 1, message.getMessageId() );
         Assert.assertEquals( 0, addResponse.getLdapResult().getResultCode() );
         Assert.assertEquals( "uid=akarasulu,dc=example,dc=com", addResponse.getLdapResult().getMatchedDN()
);



Mime
View raw message