directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1143804 - /directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
Date Thu, 07 Jul 2011 12:57:52 GMT
Author: kayyagari
Date: Thu Jul  7 12:57:51 2011
New Revision: 1143804

URL: http://svn.apache.org/viewvc?rev=1143804&view=rev
Log:
o fixed the test case related to empty pre auth data value (see DIRSERVER-1631)

Modified:
    directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java

Modified: directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java?rev=1143804&r1=1143803&r2=1143804&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/test/java/org/apache/directory/shared/kerberos/codec/PaDataDecoderTest.java
Thu Jul  7 12:57:51 2011
@@ -145,17 +145,20 @@ public class PaDataDecoderTest
         fail();
     }
     
-    
-    @Test( expected = DecoderException.class )
+    @Test
     public void testDecodePaDataWithEmptySeq() throws DecoderException
     {
         Asn1Decoder krbDecoder = new Asn1Decoder();
         
-        ByteBuffer stream = ByteBuffer.allocate( 2 );
+        ByteBuffer stream = ByteBuffer.allocate( 0x11 );
 
         stream.put( new byte[]
             { 
-                0x30, 0x0
+                0x30, 0x09,
+                  (byte)0xA1, 0x03,                 // padata-type
+                    0x02, 0x01, 0x02,
+                  (byte)0xA2, 0x02,                 // padata-value
+                    0x04, 0x00
             } );
         
         stream.flip();
@@ -163,7 +166,6 @@ public class PaDataDecoderTest
         PaDataContainer container = new PaDataContainer();
         
         krbDecoder.decode( stream, container );
-        fail();
     }
 
 }



Mime
View raw message