directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r803800 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Date Thu, 13 Aug 2009 07:33:08 GMT
Author: elecharny
Date: Thu Aug 13 07:33:08 2009
New Revision: 803800

URL: http://svn.apache.org/viewvc?rev=803800&view=rev
Log:
Added a test for getRdn( int )

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?rev=803800&r1=803799&r2=803800&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Thu Aug 13 07:33:08 2009
@@ -2003,10 +2003,7 @@
 
 
     /**
-     * Class to test for get
-     *
-     * @throws Exception
-     *             anything goes wrong
+     * Test the get( int ) method
      */
     @Test
     public void testGet() throws Exception
@@ -2020,6 +2017,19 @@
 
 
     /**
+     * Test the getRdn( int ) method
+     */
+    @Test
+    public void testGetRdn() throws Exception
+    {
+        LdapDN name = new LdapDN( "cn=HomeDir,cn=John,ou=Marketing,ou=East" );
+        assertEquals( "cn=HomeDir", name.getRdn( 3 ).getUpName() );
+        assertEquals( "cn=John", name.getRdn( 2 ).getUpName() );
+        assertEquals( "ou=Marketing", name.getRdn( 1 ).getUpName() );
+        assertEquals( "ou=East", name.getRdn( 0 ).getUpName() );
+    }
+
+    /**
      * Class to test for getSuffix
      *
      * @throws Exception



Mime
View raw message