directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065062 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
Date Sat, 29 Jan 2011 16:30:56 GMT
Author: akarasulu
Date: Sat Jan 29 16:30:56 2011
New Revision: 1065062

URL: http://svn.apache.org/viewvc?rev=1065062&view=rev
Log:
more test fixes

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java?rev=1065062&r1=1065061&r2=1065062&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/ppolicy/PasswordPolicyResponseControlTest.java
Sat Jan 29 16:30:56 2011
@@ -42,8 +42,6 @@ public class PasswordPolicyResponseContr
     @Test
     public void testDecodeRespWithExpiryWarningAndError() throws Exception
     {
-        Asn1Decoder decoder = new PasswordPolicyResponseDecoder();
-
         ByteBuffer bb = ByteBuffer.allocate( 0xA );
 
         bb.put( new byte[]
@@ -59,9 +57,8 @@ public class PasswordPolicyResponseContr
         PasswordPolicyResponseContainer container = new PasswordPolicyResponseContainer();
         container.setPasswordPolicyResponseControl( new PasswordPolicyResponseDecorator()
);
 
-        decoder.decode( bb, container );
-
         PasswordPolicyResponseDecorator control = container.getPasswordPolicyResponseControl();
+        control.decode( bb.array() );
         assertEquals( 1, control.getTimeBeforeExpiration() );
         assertEquals( 1, control.getPasswordPolicyError().getValue() );
         



Mime
View raw message