directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r881398 - /directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java
Date Tue, 17 Nov 2009 17:36:17 GMT
Author: elecharny
Date: Tue Nov 17 17:36:17 2009
New Revision: 881398

URL: http://svn.apache.org/viewvc?rev=881398&view=rev
Log:
Remove the clone test

Modified:
    directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java

Modified: directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java?rev=881398&r1=881397&r2=881398&view=diff
==============================================================================
--- directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java
(original)
+++ directory/shared/branches/shared-schema/ldap/src/test/java/org/apache/directory/shared/ldap/schema/registries/OidRegistryTest.java
Tue Nov 17 17:36:17 2009
@@ -19,11 +19,6 @@
  */
 package org.apache.directory.shared.ldap.schema.registries;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.junit.Test;
 
 
@@ -37,41 +32,7 @@
 {
 
     @Test
-    public void testClone() throws Exception
+    public void testCopy() throws Exception
     {
-        OidRegistry oidRegistry = new OidRegistry();
-        AttributeType at0 = new AttributeType( "1.1" );
-        at0.addName( "t", "test", "Test", "T" );
-
-        oidRegistry.register( at0 );
-
-        AttributeType at1 = new AttributeType( "1.2" );
-        at1.addName( "u", "unit", "Unit", "U" );
-
-        oidRegistry.register( at1 );
-        
-        // Clone the oidRegistry
-        OidRegistry clone = oidRegistry.clone();
-        
-        assertTrue( clone.hasOid( "1.1" ) );
-        assertTrue( clone.hasOid( "1.2" ) );
-        
-        at0.setOid( "2.1" );
-        assertFalse( oidRegistry.hasOid( "2.1" ) );
-        assertFalse( clone.hasOid( "2.1" ) );
-        
-        AttributeType at = (AttributeType)oidRegistry.getSchemaObject( "1.1" );
-        assertEquals( "2.1", at.getOid() );
-        
-        at = (AttributeType)clone.getSchemaObject( "1.1" );
-        assertEquals( "1.1", at.getOid() );
-
-        oidRegistry.unregister( "2.1" );
-        oidRegistry.unregister( "1.1" );
-        assertFalse( oidRegistry.hasOid( "1.1" ) );
-        assertTrue( oidRegistry.hasOid( "1.2" ) );
-        assertFalse( oidRegistry.hasOid( "2.1" ) );
-        assertTrue( clone.hasOid( "1.1" ) );
-        assertTrue( clone.hasOid( "1.2" ) );
     }
 }



Mime
View raw message