directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r371064 - in /directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls: EntryChangeControlTest.java PSearchControlTest.java SubEntryControlTest.java
Date Sat, 21 Jan 2006 14:52:16 GMT
Author: elecharny
Date: Sat Jan 21 06:52:12 2006
New Revision: 371064

URL: http://svn.apache.org/viewcvs?rev=371064&view=rev
Log:
Minor modifications

Modified:
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlTest.java
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/PSearchControlTest.java
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/SubEntryControlTest.java

Modified: directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlTest.java?rev=371064&r1=371063&r2=371064&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/EntryChangeControlTest.java
Sat Jan 21 06:52:12 2006
@@ -22,7 +22,6 @@
 
 import org.apache.asn1.codec.DecoderException;
 import org.apache.asn1.ber.Asn1Decoder;
-import org.apache.ldap.common.codec.LdapDecoder;
 import org.apache.ldap.common.util.StringTools;
 
 import junit.framework.Assert;
@@ -39,7 +38,7 @@
      */
     public void testDecodeEntryChangeControlSuccess() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new EntryChangeControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
             {
@@ -56,7 +55,7 @@
         EntryChangeControlContainer container = new EntryChangeControlContainer();
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -76,7 +75,7 @@
      */
     public void testDecodeEntryChangeControlWithADDAndChangeNumber() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new EntryChangeControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x08 );
         bb.put( new byte[]
             {
@@ -92,7 +91,7 @@
         EntryChangeControlContainer container = new EntryChangeControlContainer();
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -112,7 +111,7 @@
      */
     public void testDecodeEntryChangeControlWithADDAndPreviousDNBad() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new EntryChangeControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x0D );
         bb.put( new byte[]
             {
@@ -130,7 +129,7 @@
         
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -148,7 +147,7 @@
      */
     public void testDecodeEntryChangeControlWithADD() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new EntryChangeControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             {
@@ -164,7 +163,7 @@
         
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -184,7 +183,7 @@
      */
     public void testDecodeEntryChangeControlWithWrongChangeType() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new EntryChangeControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x05 );
         bb.put( new byte[]
             {
@@ -200,7 +199,7 @@
         
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {

Modified: directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/PSearchControlTest.java?rev=371064&r1=371063&r2=371064&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/PSearchControlTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/PSearchControlTest.java
Sat Jan 21 06:52:12 2006
@@ -22,7 +22,6 @@
 
 import org.apache.asn1.codec.DecoderException;
 import org.apache.asn1.ber.Asn1Decoder;
-import org.apache.ldap.common.codec.LdapDecoder;
 import org.apache.ldap.common.codec.search.controls.PSearchControl;
 import org.apache.ldap.common.codec.search.controls.PSearchControlContainer;
 import org.apache.ldap.common.util.StringTools;
@@ -41,7 +40,7 @@
      */
     public void testDecodeModifyDNRequestSuccess() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new PSearchControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
         bb.put( new byte[]
             {
@@ -56,7 +55,7 @@
         PSearchControlContainer container = new PSearchControlContainer();
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {

Modified: directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/SubEntryControlTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/SubEntryControlTest.java?rev=371064&r1=371063&r2=371064&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/SubEntryControlTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/search/controls/SubEntryControlTest.java
Sat Jan 21 06:52:12 2006
@@ -23,7 +23,6 @@
 import org.apache.asn1.codec.DecoderException;
 import org.apache.asn1.ber.Asn1Decoder;
 import org.apache.asn1.ber.IAsn1Container;
-import org.apache.ldap.common.codec.LdapDecoder;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -39,7 +38,7 @@
      */
     public void testDecodeSubEntryVisibilityTrue() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new SubEntryControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
         bb.put( new byte[]
             {
@@ -50,7 +49,7 @@
         SubEntryControlContainer container = new SubEntryControlContainer();
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -67,7 +66,7 @@
      */
     public void testDecodeSubEntryVisibilityFalse() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new SubEntryControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
         bb.put( new byte[]
             {
@@ -78,7 +77,7 @@
         SubEntryControlContainer container = new SubEntryControlContainer();
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
         }
         catch ( DecoderException de )
         {
@@ -95,7 +94,7 @@
      */
     public void testDecodeSubEntryEmptyVisibility() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new SubEntryControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x02 );
 
         bb.put( new byte[]
@@ -112,7 +111,7 @@
         // Decode a SubEntryControl PDU
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
             fail("We should never reach this point !!!");
         }
         catch ( DecoderException de )
@@ -126,7 +125,7 @@
      */
     public void testDecodeSubEntryBad() throws NamingException
     {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
+        Asn1Decoder decoder = new SubEntryControlDecoder();
         ByteBuffer bb = ByteBuffer.allocate( 0x03 );
 
         bb.put( new byte[]
@@ -143,7 +142,7 @@
         // Decode a SubEntryControl PDU
         try
         {
-            ldapDecoder.decode( bb, container );
+            decoder.decode( bb, container );
             fail("We should never reach this point !!!");
         }
         catch ( DecoderException de )



Mime
View raw message