directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1083163 - in /directory/shared/trunk: integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java
Date Sat, 19 Mar 2011 11:06:24 GMT
Author: elecharny
Date: Sat Mar 19 11:06:23 2011
New Revision: 1083163

URL: http://svn.apache.org/viewvc?rev=1083163&view=rev
Log:
Added a test and cleaned up some others

Modified:
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java?rev=1083163&r1=1083162&r2=1083163&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/name/AvaTest.java
Sat Mar 19 11:06:23 2011
@@ -133,7 +133,7 @@ public class AvaTest
      * test an empty AttributeTypeAndValue
      */
     @Test
-    public void testLdapRDNEmpty()
+    public void testAvaEmpty()
     {
         try
         {
@@ -151,7 +151,7 @@ public class AvaTest
      * test a simple AttributeTypeAndValue : a = b
      */
     @Test
-    public void testLdapRDNSimple() throws LdapException
+    public void testAvaSimple() throws LdapException
     {
         Ava atav = new Ava( schemaManager, "cn", "b" );
         assertEquals( "cn=b", atav.toString() );
@@ -160,6 +160,21 @@ public class AvaTest
     }
 
 
+
+
+    /**
+     * test a simple AttributeTypeAndValue : a = b
+     */
+    @Test
+    public void testAvaSimpleNorm() throws LdapException
+    {
+        Ava atav = new Ava( schemaManager, " CommonName ", " This is    a TEST " );
+        assertEquals( " CommonName = This is    a TEST ", atav.toString() );
+        assertEquals( "2.5.4.3=this is a test", atav.getNormName() );
+        assertEquals( " CommonName = This is    a TEST ", atav.getUpName() );
+    }
+
+
     /**
      * Compares two equals atavs
      */

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java?rev=1083163&r1=1083162&r2=1083163&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/AvaTest.java
Sat Mar 19 11:06:23 2011
@@ -243,4 +243,14 @@ public class AvaTest
         assertEquals( "a=a", atav.normalize() );
 
     }
+    
+    
+    @Test
+    public void testAvaSimpleNorm() throws LdapException
+    {
+        Ava atav = new Ava( schemaManager, " CommonName ", " This is    a TEST " );
+        assertEquals( " CommonName = This is    a TEST ", atav.toString() );
+        assertEquals( "commonname=\\ This is    a TEST\\ ", atav.getNormName() );
+        assertEquals( " CommonName = This is    a TEST ", atav.getUpName() );
+    }
 }



Mime
View raw message