Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > media > core-src > by-pkgid > ee629459299c5ec08884c1ae33f1a7ad > files > 2

apacheds-shared-0.9.5.3-alt1_2jpp1.7.src.rpm

--- ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java.sav	2006-10-24 22:23:48.000000000 +0200
+++ ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java	2006-10-24 22:27:54.000000000 +0200
@@ -40,7 +40,7 @@
 import javax.naming.InvalidNameException;
 import javax.naming.Name;
 import javax.naming.NamingException;
-import javax.naming.ldap.LdapName;
+//import javax.naming.ldap.LdapName;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
@@ -2324,7 +2324,7 @@
     */
    public void testName() throws NamingException
    {
-       Name jName = new javax.naming.ldap.LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        assertEquals(jName.toString(), "cn=four,cn=three,cn=two,cn=one");
        assertEquals(aName.toString(), "cn=four,cn=three,cn=two,cn=one");
@@ -2336,7 +2336,7 @@
     */
    public void testGetPrefixName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        assertEquals(jName.getPrefix(0).toString(), aName.getPrefix(0).toString());
@@ -2351,7 +2351,7 @@
     */
    public void testGetSuffix() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        assertEquals(jName.getSuffix(0).toString(), aName.getSuffix(0).toString());
@@ -2366,7 +2366,7 @@
     */
    public void testAddStringName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        assertSame(jName, jName.add("cn=five"));
@@ -2379,7 +2379,7 @@
     */
    public void testAddIntString() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        assertSame(jName, jName.add(0,"cn=zero"));
@@ -2400,10 +2400,10 @@
     */
    public void testAddAllName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
-       assertSame(jName, jName.addAll(new LdapName("cn=seven,cn=six")));
+       assertSame(jName, jName.addAll(new LdapDN("cn=seven,cn=six")));
        assertSame(aName, aName.addAll(new LdapDN("cn=seven,cn=six")));
        assertEquals(jName.toString(), aName.toString());
    }
@@ -2413,20 +2413,20 @@
     */
    public void testAddAllIntName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
-       assertSame(jName, jName.addAll(0, new LdapName("cn=zero,cn=zero.5")));
+       assertSame(jName, jName.addAll(0, new LdapDN("cn=zero,cn=zero.5")));
        assertSame(aName, aName.addAll(0, new LdapDN("cn=zero,cn=zero.5")));
        assertEquals(jName.toString(), aName.toString());
 
 
-       assertSame(jName, jName.addAll(2, new LdapName("cn=zero,cn=zero.5")));
+       assertSame(jName, jName.addAll(2, new LdapDN("cn=zero,cn=zero.5")));
        assertSame(aName, aName.addAll(2, new LdapDN("cn=zero,cn=zero.5")));
        assertEquals(jName.toString(), aName.toString());
 
 
-       assertSame(jName, jName.addAll(jName.size(), new LdapName("cn=zero,cn=zero.5")));
+       assertSame(jName, jName.addAll(jName.size(), new LdapDN("cn=zero,cn=zero.5")));
        assertSame(aName, aName.addAll(aName.size(), new LdapDN("cn=zero,cn=zero.5")));
        assertEquals(jName.toString(), aName.toString());
    }
@@ -2436,12 +2436,12 @@
     */
    public void testStartsWithName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
-       assertEquals(jName.startsWith(new LdapName("cn=seven,cn=six,cn=five")),
+       assertEquals(jName.startsWith(new LdapDN("cn=seven,cn=six,cn=five")),
                aName.startsWith(new LdapDN("cn=seven,cn=six,cn=five")));
-       assertEquals(jName.startsWith(new LdapName("cn=three,cn=two,cn=one")),
+       assertEquals(jName.startsWith(new LdapDN("cn=three,cn=two,cn=one")),
                aName.startsWith(new LdapDN("cn=three,cn=two,cn=one")));
    }
 
@@ -2450,12 +2450,12 @@
     */
    public void testEndsWithName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
-       assertEquals(jName.endsWith(new LdapName("cn=seven,cn=six,cn=five")),
+       assertEquals(jName.endsWith(new LdapDN("cn=seven,cn=six,cn=five")),
                aName.endsWith(new LdapDN("cn=seven,cn=six,cn=five")));
-       assertEquals(jName.endsWith(new LdapName("cn=three,cn=two,cn=one")),
+       assertEquals(jName.endsWith(new LdapDN("cn=three,cn=two,cn=one")),
                aName.endsWith(new LdapDN("cn=three,cn=two,cn=one")));
    }
 
@@ -2464,7 +2464,7 @@
     */
    public void testRemoveName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        assertEquals(jName.remove(0).toString(), aName.remove(0).toString());
@@ -2479,7 +2479,7 @@
     */
    public void testGetAllName() throws NamingException
    {
-       Name jName = new LdapName("cn=four,cn=three,cn=two,cn=one");
+       Name jName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
        Name aName = new LdapDN("cn=four,cn=three,cn=two,cn=one");
 
        Enumeration j = jName.getAll();
@@ -2498,7 +2498,7 @@
    public void testDoubleQuoteInNameDIRSERVER_642() throws NamingException
    {
        Name name1 = new LdapDN( "cn=\"Kylie Minogue\",dc=example,dc=com" );
-       Name name2 = new LdapName( "cn=\"Kylie Minogue\",dc=example,dc=com" );
+       Name name2 = new LdapDN( "cn=\"Kylie Minogue\",dc=example,dc=com" );
 
        Enumeration j = name1.getAll();
        Enumeration a = name2.getAll();