directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r883161 - /directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/
Date Sun, 22 Nov 2009 22:29:56 GMT
Author: elecharny
Date: Sun Nov 22 22:29:56 2009
New Revision: 883161

URL: http://svn.apache.org/viewvc?rev=883161&view=rev
Log:
As the INSTANCE filed has been removed, now call the constructors in tests

Modified:
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ByteArrayComparatorTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnComparatorTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnSidComparatorTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/TelephoneNumberComparatorTest.java

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ByteArrayComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ByteArrayComparatorTest.java?rev=883161&r1=883160&r2=883161&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ByteArrayComparatorTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ByteArrayComparatorTest.java
Sun Nov 22 22:29:56 2009
@@ -20,10 +20,10 @@
 package org.apache.directory.shared.ldap.schema.comparators;
 
 
-import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
-import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 
+import org.junit.Test;
+
 
 /**
  * Testcase to test the ByteArrayComparator.
@@ -36,42 +36,42 @@
     @Test
     public void testBothNull()
     {
-        assertEquals( 0, ByteArrayComparator.INSTANCE.compare( null, null ) );
+        assertEquals( 0, new ByteArrayComparator( null ).compare( null, null ) );
     }
 
     
     @Test
     public void testB2Null()
     {
-        assertEquals( 1, ByteArrayComparator.INSTANCE.compare( new byte[0], null ) );
+        assertEquals( 1, new ByteArrayComparator( null ).compare( new byte[0], null ) );
     }
 
     
     @Test
     public void testB1Null()
     {
-        assertEquals( -1, ByteArrayComparator.INSTANCE.compare( null, new byte[0] ) );
+        assertEquals( -1, new ByteArrayComparator( null ).compare( null, new byte[0] ) );
     }
 
     
     @Test
     public void testBothEmpty()
     {
-        assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[0], new byte[0] )
);
+        assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[0], new byte[0]
) );
     }
 
     
     @Test
     public void testBothEqualLengthOne()
     {
-        assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[1], new byte[1] )
);
+        assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[1], new byte[1]
) );
     }
 
     
     @Test
     public void testBothEqualLengthTen()
     {
-        assertEquals( 0, ByteArrayComparator.INSTANCE.compare( new byte[10], new byte[10]
) );
+        assertEquals( 0, new ByteArrayComparator( null ).compare( new byte[10], new byte[10]
) );
     }
     
     
@@ -81,7 +81,7 @@
         byte[] b1 = new byte[] { 0, 1, 2 };
         byte[] b2 = new byte[] { 0, 1, 2, 3 };
 
-        assertEquals( -1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
     
     
@@ -91,7 +91,7 @@
         byte[] b1 = new byte[] { 0, 1, 2, 3 };
         byte[] b2 = new byte[] { 0, 1, 2 };
 
-        assertEquals( 1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
     
     
@@ -101,7 +101,7 @@
         byte[] b1 = new byte[] { 0, 5 };
         byte[] b2 = new byte[] { 0, 1, 2 };
 
-        assertEquals( 1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
 
 
@@ -111,7 +111,7 @@
         byte[] b1 = new byte[] { 0, 5 };
         byte[] b2 = new byte[] { 0, 1 };
 
-        assertEquals( 1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( 1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
 
 
@@ -121,7 +121,7 @@
         byte[] b1 = new byte[] { 0, 1, 2 };
         byte[] b2 = new byte[] { 0, 5 };
 
-        assertEquals( -1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
 
 
@@ -131,6 +131,6 @@
         byte[] b1 = new byte[] { 0, 1 };
         byte[] b2 = new byte[] { 0, 5 };
 
-        assertEquals( -1, ByteArrayComparator.INSTANCE.compare( b1, b2 ) );
+        assertEquals( -1, new ByteArrayComparator( null ).compare( b1, b2 ) );
     }
 }

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnComparatorTest.java?rev=883161&r1=883160&r2=883161&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnComparatorTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnComparatorTest.java
Sun Nov 22 22:29:56 2009
@@ -19,10 +19,11 @@
  */
 package org.apache.directory.shared.ldap.schema.comparators;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.directory.shared.ldap.csn.Csn;
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -38,7 +39,7 @@
     @Before
     public void init()
     {
-        comparator = new CsnComparator();
+        comparator = new CsnComparator( null );
     }
     
     

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnSidComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnSidComparatorTest.java?rev=883161&r1=883160&r2=883161&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnSidComparatorTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/CsnSidComparatorTest.java
Sun Nov 22 22:29:56 2009
@@ -19,9 +19,10 @@
  */
 package org.apache.directory.shared.ldap.schema.comparators;
 
+import static org.junit.Assert.assertEquals;
+
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -37,7 +38,7 @@
     @Before
     public void init()
     {
-        comparator = new CsnSidComparator();
+        comparator = new CsnSidComparator( null );
     }
     
     

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java?rev=883161&r1=883160&r2=883161&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/ObjectIdentifierFirstComponentComparatorTest.java
Sun Nov 22 22:29:56 2009
@@ -19,11 +19,12 @@
  */
 package org.apache.directory.shared.ldap.schema.comparators;
 
-import org.junit.Before;
-import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotSame;
 
+import org.junit.Before;
+import org.junit.Test;
+
 
 /**
  * Test the ObjectIdentifierFirstComponent comparator
@@ -38,7 +39,7 @@
     @Before
     public void init()
     {
-        comparator = new ObjectIdentifierFirstComponentComparator();
+        comparator = new ObjectIdentifierFirstComponentComparator( null );
     }
     
     

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/TelephoneNumberComparatorTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/TelephoneNumberComparatorTest.java?rev=883161&r1=883160&r2=883161&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/TelephoneNumberComparatorTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/comparators/TelephoneNumberComparatorTest.java
Sun Nov 22 22:29:56 2009
@@ -19,11 +19,12 @@
  */
 package org.apache.directory.shared.ldap.schema.comparators;
 
-import org.junit.Before;
-import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+import org.junit.Before;
+import org.junit.Test;
+
 
 /**
  * Test the TelephoneNumber comparator
@@ -38,7 +39,7 @@
     @Before
     public void init()
     {
-        comparator = new TelephoneNumberComparator();
+        comparator = new TelephoneNumberComparator( null );
     }
     
     



Mime
View raw message