directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r372950 - /directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java
Date Fri, 27 Jan 2006 19:15:09 GMT
Author: elecharny
Date: Fri Jan 27 11:15:00 2006
New Revision: 372950

URL: http://svn.apache.org/viewcvs?rev=372950&view=rev
Log:
Deleted a duplicated test

Modified:
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java

Modified: directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java?rev=372950&r1=372949&r2=372950&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/abandon/AbandonRequestTest.java
Fri Jan 27 11:15:00 2006
@@ -39,81 +39,6 @@
  */
 public class AbandonRequestTest extends TestCase {
     /**
-     * Test the decoding of a AbandonRequest with no controls
-     */
-    public void testDecodeAbandonRequestNoControls()
-    {
-        Asn1Decoder ldapDecoder = new LdapDecoder();
-
-        ByteBuffer  stream      = ByteBuffer.allocate( 0x25 );
-        stream.put(
-            new byte[]
-            {
-                0x30, 0x23, 		  // LDAPMessage ::=SEQUENCE {
-  				  0x02, 0x01, 0x03,   //        messageID MessageID
-				  0x50, 0x01, 0x02,	  //        CHOICE { ..., abandonRequest AbandonRequest,...
-									  // AbandonRequest ::= [APPLICATION 16] MessageID
-                  (byte)0xA0, 0x1B,   // A control 
-                    0x30, 0x19, 
-                      0x04, 0x17, 
-                        0x32, 0x2E, 0x31, 0x36, 0x2E, 0x38, 0x34, 0x30, 
-                        0x2E, 0x31, 0x2E, 0x31, 0x31, 0x33, 0x37, 0x33, 
-                        0x30, 0x2E, 0x33, 0x2E, 0x34, 0x2E, 0x32
-            } );
-
-        String decodedPdu = StringTools.dumpBytes( stream.array() );
-        stream.flip();
-
-        // Allocate a LdapMessageContainer Container
-        IAsn1Container ldapMessageContainer = new LdapMessageContainer();
-
-        // Decode the PDU
-        try
-        {
-            ldapDecoder.decode( stream, ldapMessageContainer );
-        }
-        catch ( DecoderException de )
-        {
-            de.printStackTrace();
-            fail( de.getMessage() );
-        }
-    	
-        // Check that everything is OK
-        LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        AbandonRequest abandonRequest = message.getAbandonRequest();
-
-        assertEquals( 3, message.getMessageId() );
-        assertEquals( 2, abandonRequest.getAbandonedMessageId() );
-        
-        // Check the length
-        assertEquals( 0x25, message.computeLength());
-        
-        // Check the Control
-        List controls = message.getControls();
-        
-        assertEquals( 1, controls.size() );
-        
-        Control control = message.getControls( 0 );
-        assertEquals( "2.16.840.1.113730.3.4.2", control.getControlType() );
-        assertEquals( "", StringTools.dumpBytes( (byte[])control.getControlValue() ) );
-
-        // Check the encoding
-        try
-        {
-            ByteBuffer bb = message.encode( null );
-            
-            String encodedPdu = StringTools.dumpBytes( bb.array() ); 
-            
-            assertEquals(encodedPdu, decodedPdu );
-        }
-        catch ( EncoderException ee )
-        {
-            ee.printStackTrace();
-            fail( ee.getMessage() );
-        }
-    }
-
-    /**
      * Test the decoding of a AbandonRequest with controls
      */
     public void testDecodeAbandonRequestWithControls()



Mime
View raw message