You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2004/08/23 07:24:42 UTC

svn commit: rev 36755 - in incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder: . bind

Author: akarasulu
Date: Sun Aug 22 22:24:42 2004
New Revision: 36755

Modified:
   incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/AbstractEncoderTestCase.java
   incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/bind/BindResponseEncoderTest.java
Log:
Added the other constructors to the base class and reverted back to the old 
configuration in BindResponseEncoderTest.  BTW there is a default accumulator
size now.


Modified: incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/AbstractEncoderTestCase.java
==============================================================================
--- incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/AbstractEncoderTestCase.java	(original)
+++ incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/AbstractEncoderTestCase.java	Sun Aug 22 22:24:42 2004
@@ -43,10 +43,35 @@
 public class AbstractEncoderTestCase extends TestCase
         implements EncoderCallback
 {
+    /** the default buffer size for accumulator when none is provided */
+    private static final int DEFAULT_BUFSZ = 128;
     /** collects/accumulates the chunks emitted from the encoder */
     private ByteBuffer accumulator;
     /** the max buffer size for the accumulator */
     private final int bufsz;
+
+
+    /**
+     * Creates a test case with the default buffer size for the accumulator.
+     */
+    public AbstractEncoderTestCase()
+    {
+        super();
+        bufsz = DEFAULT_BUFSZ;
+    }
+
+
+    /**
+     * Creates a test case with a name using the default buffer size for the
+     * accumulator.
+     *
+     * @param name the name of the test case
+     */
+    public AbstractEncoderTestCase( String name )
+    {
+        super( name );
+        bufsz = DEFAULT_BUFSZ;
+    }
 
 
     /**

Modified: incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/bind/BindResponseEncoderTest.java
==============================================================================
--- incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/bind/BindResponseEncoderTest.java	(original)
+++ incubator/directory/snickers/branches/encoder-redesign/ldap-ber-provider/src/test/org/apache/snickers/ldap/encoder/bind/BindResponseEncoderTest.java	Sun Aug 22 22:24:42 2004
@@ -35,15 +35,9 @@
  */
 public class BindResponseEncoderTest extends AbstractEncoderTestCase
 {
-    public BindResponseEncoderTest( String name )
-    {
-        super( name, 128 );
-    }
-
-
     /**
      * Tests the encoder's encode() method.
-     */ 
+     */
     public void testEncode()
     {
         // Construct the bind response to test with results and referrals