directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r208735 - /directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java
Date Fri, 01 Jul 2005 09:15:50 GMT
Author: elecharny
Date: Fri Jul  1 02:15:49 2005
New Revision: 208735

URL: http://svn.apache.org/viewcvs?rev=208735&view=rev
Log:
Changed the tests to reflect the changes of DNUtils. (A lot of methods have migrated from
DNUtils
to StringUtils)

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java?rev=208735&r1=208734&r2=208735&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/test/org/apache/asn1/ldap/codec/utils/DNUtilsTest.java
Fri Jul  1 02:15:49 2005
@@ -16,7 +16,7 @@
  */
 package org.apache.asn1.ldap.codec.utils;
 
-import org.apache.asn1.ldap.codec.utils.DNUtils;
+import org.apache.asn1.util.StringUtils;
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
 
@@ -55,7 +55,7 @@
     public void testAreEqualsFull()
     {
         // Full compare
-        Assert.assertEquals( 6, DNUtils.areEquals( "azerty".getBytes(), 0, "azerty" ) );
+        Assert.assertEquals( 6, StringUtils.areEquals( "azerty".getBytes(), 0, "azerty" )
);
     }
 
     /**
@@ -64,7 +64,7 @@
     public void testAreEqualsDiff()
     {
         // First character is !=
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "Azerty" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "Azerty"
) );
     }
 
     /**
@@ -73,7 +73,7 @@
     public void testAreEqualsEmpty()
     {
         // Compare to an empty string
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "" ) );
     }
 
     /**
@@ -82,7 +82,7 @@
     public void testAreEqualsFirstCharDiff()
     {
         // First character is !=
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "Azerty" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "Azerty"
) );
     }
     
     /**
@@ -91,7 +91,7 @@
     public void testAreEqualsMiddleCharDiff()
     {
         // First character is !=
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "azeRty" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "azeRty"
) );
     }
     
     /**
@@ -100,7 +100,7 @@
     public void testAreEqualsLastCharDiff()
     {
         // First character is !=
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "azertY" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "azertY"
) );
     }
     
     /**
@@ -109,12 +109,12 @@
     public void testAreEqualsCharByChar()
     {
         // Index must be incremented after each comparison
-        Assert.assertEquals( 1, DNUtils.areEquals( "azerty".getBytes(), 0, "a" ) );
-        Assert.assertEquals( 2, DNUtils.areEquals( "azerty".getBytes(), 1, "z" ) );
-        Assert.assertEquals( 3, DNUtils.areEquals( "azerty".getBytes(), 2, "e" ) );
-        Assert.assertEquals( 4, DNUtils.areEquals( "azerty".getBytes(), 3, "r" ) );
-        Assert.assertEquals( 5, DNUtils.areEquals( "azerty".getBytes(), 4, "t" ) );
-        Assert.assertEquals( 6, DNUtils.areEquals( "azerty".getBytes(), 5, "y" ) );
+        Assert.assertEquals( 1, StringUtils.areEquals( "azerty".getBytes(), 0, "a" ) );
+        Assert.assertEquals( 2, StringUtils.areEquals( "azerty".getBytes(), 1, "z" ) );
+        Assert.assertEquals( 3, StringUtils.areEquals( "azerty".getBytes(), 2, "e" ) );
+        Assert.assertEquals( 4, StringUtils.areEquals( "azerty".getBytes(), 3, "r" ) );
+        Assert.assertEquals( 5, StringUtils.areEquals( "azerty".getBytes(), 4, "t" ) );
+        Assert.assertEquals( 6, StringUtils.areEquals( "azerty".getBytes(), 5, "y" ) );
     }
 
     /**
@@ -123,7 +123,7 @@
     public void testAreEqualsTooShort()
     {
         // length too short
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "azertyiop" )
);
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "azertyiop"
) );
     }
 
     /**
@@ -132,7 +132,7 @@
     public void testAreEqualsTooShortMiddle()
     {
         // length too short
-        Assert.assertEquals( -1, DNUtils.areEquals( "azerty".getBytes(), 0, "ertyiop" ) );
+        Assert.assertEquals( -1, StringUtils.areEquals( "azerty".getBytes(), 0, "ertyiop"
) );
     }
 
     /**
@@ -141,7 +141,7 @@
     public void testAreEqualsLastChar()
     {
         // last character
-        Assert.assertEquals( 6, DNUtils.areEquals( "azerty".getBytes(), 5, "y" ) );
+        Assert.assertEquals( 6, StringUtils.areEquals( "azerty".getBytes(), 5, "y" ) );
     }
 
     /**
@@ -150,6 +150,6 @@
     public void testAreEqualsMiddle()
     {
         // In the middle
-        Assert.assertEquals( 4, DNUtils.areEquals( "azerty".getBytes(), 2, "er" ) );
+        Assert.assertEquals( 4, StringUtils.areEquals( "azerty".getBytes(), 2, "er" ) );
     }
 }



Mime
View raw message