directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 9755 - incubator/directory/snickers/branches/chunking/ber/src/test/org/apache/snickers/ber
Date Fri, 26 Mar 2004 04:14:01 GMT
Author: akarasulu
Date: Thu Mar 25 20:14:01 2004
New Revision: 9755

Modified:
   incubator/directory/snickers/branches/chunking/ber/src/test/org/apache/snickers/ber/AbstractDecoderTestCaseTest.java
Log:
changes for chunking

Modified: incubator/directory/snickers/branches/chunking/ber/src/test/org/apache/snickers/ber/AbstractDecoderTestCaseTest.java
==============================================================================
--- incubator/directory/snickers/branches/chunking/ber/src/test/org/apache/snickers/ber/AbstractDecoderTestCaseTest.java
(original)
+++ incubator/directory/snickers/branches/chunking/ber/src/test/org/apache/snickers/ber/AbstractDecoderTestCaseTest.java
Thu Mar 25 20:14:01 2004
@@ -17,6 +17,8 @@
 package org.apache.snickers.ber ;
 
 
+import java.nio.ByteBuffer;
+
 import org.apache.commons.lang.ArrayUtils ;
 
 
@@ -68,20 +70,26 @@
     public void testDecodeTupleArray() throws Exception
     {
         Tuple [] tuples = new Tuple[2] ;
-        tuples[0] = new Tuple(1, ArrayUtils.EMPTY_BYTE_ARRAY ) ;
-        tuples[1] = new Tuple(1, ArrayUtils.EMPTY_BYTE_ARRAY ) ;
-        decode(tuples) ;
+        tuples[0] = new Tuple( 1, 0 ) ;
+        tuples[1] = new Tuple( 1, 0 ) ;
         
-        decode( new Tuple[0] ) ;
+        ByteBuffer[] buffers = new ByteBuffer[2] ; 
+        buffers[0] = ByteBuffer.wrap( ArrayUtils.EMPTY_BYTE_ARRAY ) ;
+        buffers[1] = ByteBuffer.wrap( ArrayUtils.EMPTY_BYTE_ARRAY ) ;
+        decode( tuples, buffers ) ;
+        decode( tuples[0], ByteBuffer.wrap( ArrayUtils.EMPTY_BYTE_ARRAY ) ) ;
     }
 
     public void testCallbackOccured() throws Exception
     {
         decoder.setDecoderMonitor( this ) ;
         Tuple [] tuples = new Tuple[2] ;
-        tuples[0] = new Tuple(1, ArrayUtils.EMPTY_BYTE_ARRAY ) ;
-        tuples[1] = new Tuple(1, ArrayUtils.EMPTY_BYTE_ARRAY ) ;
-        decode(tuples) ;
+        tuples[0] = new Tuple(1, 0) ;
+        tuples[1] = new Tuple(1, 0) ;
+        ByteBuffer[] buffers = new ByteBuffer[2] ; 
+        buffers[0] = ByteBuffer.wrap( ArrayUtils.EMPTY_BYTE_ARRAY ) ;
+        buffers[1] = ByteBuffer.wrap( ArrayUtils.EMPTY_BYTE_ARRAY ) ;
+        decode(tuples, buffers) ;
         callbackOccured(decoder, this, tuples[1]) ;
     }
 

Mime
View raw message