directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r753296 [2/2] - in /directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec: ./ abandon/ add/ bind/ compare/ controls/replication/ del/ intermediate/ modify/ modifyDn/ search/ search/controls/ ...
Date Fri, 13 Mar 2009 15:17:55 GMT
Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
Fri Mar 13 15:17:52 2009
@@ -28,9 +28,11 @@
 import org.apache.directory.shared.ldap.codec.search.controls.pSearch.PSearchControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.pSearch.PSearchControlDecoder;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
 
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
@@ -38,11 +40,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PSearchControlTest extends TestCase
+public class PSearchControlTest
 {
     /**
      * Test encoding of a PSearchControl.
      */
+    @Test
     public void testEncodePSearchControl() throws Exception
     {
         ByteBuffer bb = ByteBuffer.allocate( 0x0b );
@@ -69,6 +72,7 @@
     /**
      * Test the decoding of a PSearchControl with combined changes types
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessChangeTypesAddModDN()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -89,7 +93,7 @@
         }
         catch ( DecoderException de )
         {
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         PSearchControlCodec control = container.getPSearchControl();
@@ -104,6 +108,7 @@
      * Test the decoding of a PSearchControl with a changes types which
      * value is 0
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessChangeTypes0()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -133,6 +138,7 @@
      * Test the decoding of a PSearchControl with a changes types which
      * value is above 15
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessChangeTypes22()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -161,6 +167,7 @@
     /**
      * Test the decoding of a PSearchControl with a null sequence
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessNullSequence()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -186,6 +193,7 @@
     /**
      * Test the decoding of a PSearchControl without changeTypes
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessWithoutChangeTypes()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -213,6 +221,7 @@
     /**
      * Test the decoding of a PSearchControl without changeOnly
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessWithoutChangesOnly()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();
@@ -240,6 +249,7 @@
     /**
      * Test the decoding of a PSearchControl without returnECs
      */
+    @Test
     public void testDecodeModifyDNRequestSuccessWithoutReturnECs()
     {
         Asn1Decoder decoder = new PSearchControlDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
Fri Mar 13 15:17:52 2009
@@ -30,9 +30,10 @@
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedSearchControlDecoder;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -40,7 +41,7 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class PagedSearchControlTest extends TestCase
+public class PagedSearchControlTest
 {
     /**
      * Test encoding of a PagedSearchControl.
@@ -67,7 +68,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         PagedSearchControlCodec pagedSearch = container.getPagedSearchControl();
@@ -198,7 +199,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         PagedSearchControlCodec pagedSearch = container.getPagedSearchControl();
@@ -274,7 +275,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         PagedSearchControlCodec pagedSearch = container.getPagedSearchControl();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/SubEntryControlTest.java
Fri Mar 13 15:17:52 2009
@@ -28,9 +28,10 @@
 import org.apache.directory.shared.ldap.codec.search.controls.subEntry.SubEntryControlCodec;
 import org.apache.directory.shared.ldap.codec.search.controls.subEntry.SubEntryControlContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.subEntry.SubEntryControlDecoder;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assert.assertFalse;
 
 
 /**
@@ -38,11 +39,12 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SubEntryControlTest extends TestCase
+public class SubEntryControlTest
 {
     /**
      * Test the decoding of a SubEntryControl with a true visibility
      */
+    @Test
     public void testDecodeSubEntryVisibilityTrue()
     {
         Asn1Decoder decoder = new SubEntryControlDecoder();
@@ -60,7 +62,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         SubEntryControlCodec control = container.getSubEntryControl();
@@ -71,6 +73,7 @@
     /**
      * Test the decoding of a SubEntryControl with a false visibility
      */
+    @Test
     public void testDecodeSubEntryVisibilityFalse()
     {
         Asn1Decoder decoder = new SubEntryControlDecoder();
@@ -88,7 +91,7 @@
         catch ( DecoderException de )
         {
             de.printStackTrace();
-            Assert.fail( de.getMessage() );
+            fail( de.getMessage() );
         }
 
         SubEntryControlCodec control = container.getSubEntryControl();
@@ -99,6 +102,7 @@
     /**
      * Test the decoding of a SubEntryControl with an empty visibility
      */
+    @Test
     public void testDecodeSubEntryEmptyVisibility()
     {
         Asn1Decoder decoder = new SubEntryControlDecoder();
@@ -129,6 +133,7 @@
     /**
      * Test the decoding of a bad SubEntryControl
      */
+    @Test
     public void testDecodeSubEntryBad()
     {
         Asn1Decoder decoder = new SubEntryControlDecoder();

Modified: directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java?rev=753296&r1=753295&r2=753296&view=diff
==============================================================================
--- directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
(original)
+++ directory/shared/branches/shared-replication/ldap/src/test/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestTest.java
Fri Mar 13 15:17:52 2009
@@ -32,18 +32,21 @@
 import org.apache.directory.shared.ldap.codec.LdapMessage;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.util.StringTools;
-
-import junit.framework.TestCase;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class UnBindRequestTest extends TestCase
+public class UnBindRequestTest
 {
     /**
      * Test the decoding of a UnBindRequest with no controls
      */
+    @Test
     public void testDecodeUnBindRequestNoControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -99,6 +102,7 @@
     /**
      * Test the decoding of a UnBindRequest with controls
      */
+    @Test
     public void testDecodeUnBindRequestWithControls()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();
@@ -168,6 +172,7 @@
     /**
      * Test the decoding of a UnBindRequest with a not null body
      */
+    @Test
     public void testDecodeUnBindRequestNotNull()
     {
         Asn1Decoder ldapDecoder = new LdapDecoder();



Mime
View raw message