directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r369489 - in /directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec: LdapDecoderTest.java abandon/AbandonRequestTest.java
Date Mon, 16 Jan 2006 14:26:22 GMT
Author: elecharny
Date: Mon Jan 16 06:26:18 2006
New Revision: 369489

URL: http://svn.apache.org/viewcvs?rev=369489&view=rev
Log:
Removed the useless "Assert." prefix.

Modified:
    directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/LdapDecoderTest.java
    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/LdapDecoderTest.java
URL: http://svn.apache.org/viewcvs/directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/LdapDecoderTest.java?rev=369489&r1=369488&r2=369489&view=diff
==============================================================================
--- directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/LdapDecoderTest.java
(original)
+++ directory/trunks/common/ldap/src/test/java/org/apache/ldap/common/codec/LdapDecoderTest.java
Mon Jan 16 06:26:18 2006
@@ -81,18 +81,18 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         // Check the decoded PDU
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         BindRequest br      = message.getBindRequest();
 
-        Assert.assertEquals( 1, message.getMessageId() );
-        Assert.assertEquals( 3, br.getVersion() );
-        Assert.assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName() );
-        Assert.assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication
) );
-        Assert.assertEquals( "password",
+        assertEquals( 1, message.getMessageId() );
+        assertEquals( 3, br.getVersion() );
+        assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName() );
+        assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication ) );
+        assertEquals( "password",
             StringTools.utf8ToString( ( ( SimpleAuthentication ) br.getAuthentication() ).getSimple()
) );
     }
 
@@ -130,7 +130,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         Assert.assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState()
);
@@ -139,10 +139,10 @@
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         BindRequest br      = message.getBindRequest();
 
-        Assert.assertEquals( 1, message.getMessageId() );
-        Assert.assertEquals( 3, br.getVersion() );
-        Assert.assertEquals( null, br.getName() );
-        Assert.assertEquals( false, ( br.getAuthentication() instanceof SimpleAuthentication
) );
+        assertEquals( 1, message.getMessageId() );
+        assertEquals( 3, br.getVersion() );
+        assertEquals( null, br.getName() );
+        assertEquals( false, ( br.getAuthentication() instanceof SimpleAuthentication ) );
     }
 
     /**
@@ -179,10 +179,10 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
-        Assert.assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState()
);
+        assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState() );
 
         // Second block of data
         stream = ByteBuffer.allocate( 37 );
@@ -205,20 +205,20 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
-        Assert.assertEquals( ldapMessageContainer.getState(), TLVStateEnum.PDU_DECODED );
+        assertEquals( ldapMessageContainer.getState(), TLVStateEnum.PDU_DECODED );
         
         // Check the decoded PDU
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         BindRequest br      = message.getBindRequest();
 
-        Assert.assertEquals( 1, message.getMessageId() );
-        Assert.assertEquals( 3, br.getVersion() );
-        Assert.assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName() );
-        Assert.assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication
) );
-        Assert.assertEquals( "password",
+        assertEquals( 1, message.getMessageId() );
+        assertEquals( 3, br.getVersion() );
+        assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName() );
+        assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication ) );
+        assertEquals( "password",
             StringTools.utf8ToString( ( ( SimpleAuthentication ) br.getAuthentication() ).getSimple()
) );
     }
 
@@ -261,12 +261,12 @@
         }
         catch ( DecoderException de )
         {
-            Assert.assertEquals( "The current Value length is above the expected length",
+            assertEquals( "The current Value length is above the expected length",
                 de.getMessage() );
             return;
         }
 
-        Assert.fail( "Should never reach this point.." );
+        fail( "Should never reach this point.." );
     }
 
     /**
@@ -308,11 +308,11 @@
         }
         catch ( DecoderException de )
         {
-            Assert.assertEquals( "Universal tag 14 is reserved", de.getMessage() );
+            assertEquals( "Universal tag 14 is reserved", de.getMessage() );
             return;
         }
 
-        Assert.fail( "Should never reach this point." );
+        fail( "Should never reach this point." );
     }
 
     /**
@@ -354,11 +354,11 @@
         }
         catch ( DecoderException de )
         {
-            Assert.assertEquals( "Bad transition !",
+            assertEquals( "Bad transition !",
                 de.getMessage() );
             return;
         }
 
-        Assert.fail( "Should never reach this point." );
+        fail( "Should never reach this point." );
     }
 }

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=369489&r1=369488&r2=369489&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
Mon Jan 16 06:26:18 2006
@@ -28,7 +28,6 @@
 import org.apache.ldap.common.codec.abandon.AbandonRequest;
 import org.apache.ldap.common.util.StringTools;
 
-import junit.framework.Assert;
 import junit.framework.TestCase;
 
 /**
@@ -68,18 +67,18 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
     	
         // Check that everything is OK
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         AbandonRequest abandonRequest = message.getAbandonRequest();
 
-        Assert.assertEquals( 3, message.getMessageId() );
-        Assert.assertEquals( 2, abandonRequest.getAbandonedMessageId() );
+        assertEquals( 3, message.getMessageId() );
+        assertEquals( 2, abandonRequest.getAbandonedMessageId() );
         
         // Check the length
-        Assert.assertEquals(8, message.computeLength());
+        assertEquals(8, message.computeLength());
         
         // Check the encoding
         try
@@ -88,12 +87,12 @@
             
             String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
-            Assert.assertEquals(encodedPdu, decodedPdu );
+            assertEquals(encodedPdu, decodedPdu );
         }
         catch ( EncoderException ee )
         {
             ee.printStackTrace();
-            Assert.fail( ee.getMessage() );
+            fail( ee.getMessage() );
         }
     }
 
@@ -146,18 +145,18 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
         
         // Check that everything is OK
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         AbandonRequest abandonRequest = message.getAbandonRequest();
 
-        Assert.assertEquals( 3, message.getMessageId() );
-        Assert.assertEquals( 2, abandonRequest.getAbandonedMessageId() );
+        assertEquals( 3, message.getMessageId() );
+        assertEquals( 2, abandonRequest.getAbandonedMessageId() );
         
         // Check the length
-        Assert.assertEquals(0x64, message.computeLength());
+        assertEquals(0x64, message.computeLength());
         
         // Check the encoding
         try
@@ -166,12 +165,12 @@
             
             String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
-            Assert.assertEquals(encodedPdu, decodedPdu );
+            assertEquals(encodedPdu, decodedPdu );
         }
         catch ( EncoderException ee )
         {
             ee.printStackTrace();
-            Assert.fail( ee.getMessage() );
+            fail( ee.getMessage() );
         }
     }
 
@@ -206,18 +205,18 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
         
         // Check that everything is OK
         LdapMessage message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
         AbandonRequest abandonRequest = message.getAbandonRequest();
 
-        Assert.assertEquals( 32787, message.getMessageId() );
-        Assert.assertEquals( 2, abandonRequest.getAbandonedMessageId() );
+        assertEquals( 32787, message.getMessageId() );
+        assertEquals( 2, abandonRequest.getAbandonedMessageId() );
         
         // Check the length
-        Assert.assertEquals(10, message.computeLength());
+        assertEquals(10, message.computeLength());
         
         // Check the encoding
         try
@@ -226,12 +225,12 @@
             
             String encodedPdu = StringTools.dumpBytes( bb.array() ); 
             
-            Assert.assertEquals(encodedPdu, decodedPdu );
+            assertEquals(encodedPdu, decodedPdu );
         }
         catch ( EncoderException ee )
         {
             ee.printStackTrace();
-            Assert.fail( ee.getMessage() );
+            fail( ee.getMessage() );
         }
     }
 



Mime
View raw message