directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r493916 [7/7] - in /directory/branches: apacheds/1.0/core-unit/ apacheds/1.0/core-unit/src/main/java/org/apache/directory/server/core/unit/ apacheds/1.0/core-unit/src/test/java/org/apache/directory/server/core/ apacheds/1.0/core-unit/src/te...
Date Mon, 08 Jan 2007 02:44:40 GMT
Copied: directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributesImplTest.java
(from r493207, directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java)
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributesImplTest.java?view=diff&rev=493916&p1=directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java&r1=493207&p2=directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributesImplTest.java&r2=493916
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/LockableAttributesImplTest.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/AttributesImplTest.java
Sun Jan  7 18:44:33 2007
@@ -20,12 +20,12 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import junit.framework.TestCase;
+import javax.naming.directory.Attributes;
 
-import javax.naming.directory.BasicAttributes;
+import junit.framework.TestCase;
 
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.util.ArrayUtils;
 
 /**
@@ -34,7 +34,7 @@
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  *         $Rev$
  */
-public class LockableAttributesImplTest extends TestCase
+public class AttributesImplTest extends TestCase
 {
     /**
      * Creates and populates a LockableAttributeImpl with a specific id.
@@ -43,9 +43,9 @@
      *            the id for the attribute
      * @return the LockableAttributeImpl assembled for testing
      */
-    private LockableAttributeImpl getAttribute( String id )
+    private AttributeImpl getAttribute( String id )
     {
-        LockableAttributeImpl attr = new LockableAttributeImpl( id );
+        AttributeImpl attr = new AttributeImpl( id );
         attr.add( "value0" );
         attr.add( "value1" );
         attr.add( "value2" );
@@ -58,9 +58,9 @@
      * 
      * @return
      */
-    private LockableAttributesImpl getAttributes()
+    private AttributesImpl getAttributes()
     {
-        LockableAttributesImpl attrs = new LockableAttributesImpl();
+        AttributesImpl attrs = new AttributesImpl();
         attrs.put( getAttribute( "attr0" ) );
         attrs.put( getAttribute( "attr1" ) );
         attrs.put( getAttribute( "attr2" ) );
@@ -73,7 +73,7 @@
      */
     public void testToString()
     {
-        LockableAttributesImpl attrs = getAttributes();
+        AttributesImpl attrs = getAttributes();
         attrs.put( "binaryNullAttr", null );
         attrs.put( "binaryEmptyAttr", ArrayUtils.EMPTY_BYTE_ARRAY );
         attrs.put( "binaryFullAttr", new byte[]
@@ -90,7 +90,7 @@
      */
     public void testEqualsSameObj()
     {
-        LockableAttributesImpl attrs = getAttributes();
+        AttributesImpl attrs = getAttributes();
         assertTrue( "same object should return true", attrs.equals( attrs ) );
     }
 
@@ -100,8 +100,8 @@
      */
     public void testEqualsExactCopy()
     {
-        LockableAttributesImpl attrs0 = getAttributes();
-        LockableAttributesImpl attrs1 = getAttributes();
+        AttributesImpl attrs0 = getAttributes();
+        AttributesImpl attrs1 = getAttributes();
         assertTrue( "exact copies should be equal", attrs0.equals( attrs1 ) );
         assertTrue( "exact copies should be equal", attrs1.equals( attrs0 ) );
     }
@@ -113,8 +113,8 @@
      */
     public void testEqualsExactCopyWithReplicas()
     {
-        LockableAttributesImpl attrs0 = getAttributes();
-        LockableAttributesImpl attrs1 = getAttributes();
+        AttributesImpl attrs0 = getAttributes();
+        AttributesImpl attrs1 = getAttributes();
         attrs1.put( getAttribute( "attr0" ) );
         attrs1.put( getAttribute( "attr0" ) );
         assertTrue( "exact copies with repeated adds should be equal", attrs0.equals( attrs1
) );
@@ -127,8 +127,8 @@
      */
     public void testNotEqualDiffAttr()
     {
-        LockableAttributesImpl attrs0 = getAttributes();
-        LockableAttributesImpl attrs1 = getAttributes();
+        AttributesImpl attrs0 = getAttributes();
+        AttributesImpl attrs1 = getAttributes();
         attrs1.put( getAttribute( "blah" ) );
         assertFalse( "different attributes should not be equal", attrs0.equals( attrs1 )
);
         assertFalse( "different attributes should not be equal", attrs1.equals( attrs0 )
);
@@ -140,8 +140,8 @@
      */
     public void testEqualsDiffImpl()
     {
-        LockableAttributesImpl attrs0 = getAttributes();
-        BasicAttributes attrs1 = new BasicAttributes( true );
+        AttributesImpl attrs0 = getAttributes();
+        Attributes attrs1 = new AttributesImpl( true );
         attrs1.put( getAttribute( "attr0" ) );
         attrs1.put( getAttribute( "attr1" ) );
         attrs1.put( getAttribute( "attr2" ) );
@@ -153,13 +153,13 @@
 
     public void testCompareToBasicAttributes()
     {
-        LockableAttributesImpl attrs0 = new LockableAttributesImpl();
+        AttributesImpl attrs0 = new AttributesImpl();
         attrs0.put( "attr0", "value0" );
         attrs0.put( "attr1", "value1" );
         attrs0.put( "attr2", "value2" );
         attrs0.put( "attr2", "value3" );
 
-        BasicAttributes attrs1 = new BasicAttributes( true );
+        Attributes attrs1 = new AttributesImpl( true );
         attrs1.put( "attr0", "value0" );
         attrs1.put( "attr1", "value1" );
         attrs1.put( "attr2", "value2" );

Modified: directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
Sun Jan  7 18:44:33 2007
@@ -24,11 +24,10 @@
 
 import javax.naming.InvalidNameException;
 import javax.naming.directory.DirContext;
-import javax.naming.directory.ModificationItem;
 
 import org.apache.directory.shared.ldap.message.AbandonListener;
 import org.apache.directory.shared.ldap.message.Control;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.ModifyRequest;
@@ -69,22 +68,22 @@
             // do nothing
         }
 
-        LockableAttributeImpl attr = new LockableAttributeImpl( "attr0" );
+        AttributeImpl attr = new AttributeImpl( "attr0" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
         req.addModification( item );
 
-        attr = new LockableAttributeImpl( "attr1" );
+        attr = new AttributeImpl( "attr1" );
         attr.add( "val3" );
-        item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
+        item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
         req.addModification( item );
 
-        attr = new LockableAttributeImpl( "attr2" );
+        attr = new AttributeImpl( "attr2" );
         attr.add( "val4" );
         attr.add( "val5" );
-        item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
+        item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
         req.addModification( item );
 
         return req;
@@ -150,19 +149,19 @@
     public void testNotEqualDiffModOps() throws InvalidNameException
     {
         ModifyRequestImpl req0 = getRequest();
-        LockableAttributeImpl attr = new LockableAttributeImpl( "attr3" );
+        AttributeImpl attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
-        attr = new LockableAttributeImpl( "attr3" );
+        attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
+        item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -176,11 +175,11 @@
     public void testNotEqualDiffModCount() throws InvalidNameException
     {
         ModifyRequestImpl req0 = getRequest();
-        LockableAttributeImpl attr = new LockableAttributeImpl( "attr3" );
+        AttributeImpl attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
@@ -196,19 +195,19 @@
     public void testNotEqualDiffModIds() throws InvalidNameException
     {
         ModifyRequestImpl req0 = getRequest();
-        LockableAttributeImpl attr = new LockableAttributeImpl( "attr3" );
+        AttributeImpl attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
-        attr = new LockableAttributeImpl( "attr4" );
+        attr = new AttributeImpl( "attr4" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -222,20 +221,20 @@
     public void testNotEqualDiffModValues() throws InvalidNameException
     {
         ModifyRequestImpl req0 = getRequest();
-        LockableAttributeImpl attr = new LockableAttributeImpl( "attr3" );
+        AttributeImpl attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
-        ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr
);
         req0.addModification( item );
 
         ModifyRequestImpl req1 = getRequest();
-        attr = new LockableAttributeImpl( "attr3" );
+        attr = new AttributeImpl( "attr3" );
         attr.add( "val0" );
         attr.add( "val1" );
         attr.add( "val2" );
         attr.add( "val3" );
-        item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr );
+        item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE, attr );
         req0.addModification( item );
 
         assertFalse( req0.equals( req1 ) );
@@ -253,34 +252,34 @@
             public Collection getModificationItems()
             {
                 ArrayList list = new ArrayList();
-                LockableAttributeImpl attr = new LockableAttributeImpl( "attr0" );
+                AttributeImpl attr = new AttributeImpl( "attr0" );
                 attr.add( "val0" );
                 attr.add( "val1" );
                 attr.add( "val2" );
-                ModificationItem item = new ModificationItem( DirContext.ADD_ATTRIBUTE, attr
);
+                ModificationItemImpl item = new ModificationItemImpl( DirContext.ADD_ATTRIBUTE,
attr );
                 list.add( item );
 
-                attr = new LockableAttributeImpl( "attr1" );
+                attr = new AttributeImpl( "attr1" );
                 attr.add( "val3" );
-                item = new ModificationItem( DirContext.REMOVE_ATTRIBUTE, attr );
+                item = new ModificationItemImpl( DirContext.REMOVE_ATTRIBUTE, attr );
                 list.add( item );
 
-                attr = new LockableAttributeImpl( "attr2" );
+                attr = new AttributeImpl( "attr2" );
                 attr.add( "val4" );
                 attr.add( "val5" );
-                item = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
+                item = new ModificationItemImpl( DirContext.REPLACE_ATTRIBUTE, attr );
                 list.add( item );
 
                 return list;
             }
 
 
-            public void addModification( ModificationItem a_mod )
+            public void addModification( ModificationItemImpl a_mod )
             {
             }
 
 
-            public void removeModification( ModificationItem a_mod )
+            public void removeModification( ModificationItemImpl a_mod )
             {
             }
 

Modified: directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java?view=diff&rev=493916&r1=493915&r2=493916
==============================================================================
--- directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
(original)
+++ directory/branches/shared/0.9.5/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
Sun Jan  7 18:44:33 2007
@@ -29,8 +29,8 @@
 import javax.naming.directory.Attributes;
 
 import org.apache.directory.shared.ldap.message.Control;
-import org.apache.directory.shared.ldap.message.LockableAttributeImpl;
-import org.apache.directory.shared.ldap.message.LockableAttributesImpl;
+import org.apache.directory.shared.ldap.message.AttributeImpl;
+import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.MessageException;
 import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SearchResponseEntry;
@@ -53,9 +53,9 @@
      *            the id for the attribute
      * @return the LockableAttributeImpl assembled for testing
      */
-    private LockableAttributeImpl getAttribute( String id )
+    private AttributeImpl getAttribute( String id )
     {
-        LockableAttributeImpl attr = new LockableAttributeImpl( id );
+        AttributeImpl attr = new AttributeImpl( id );
         attr.add( "value0" );
         attr.add( "value1" );
         attr.add( "value2" );
@@ -68,9 +68,9 @@
      * 
      * @return
      */
-    LockableAttributesImpl getAttributes()
+    AttributesImpl getAttributes()
     {
-        LockableAttributesImpl attrs = new LockableAttributesImpl();
+        AttributesImpl attrs = new AttributesImpl();
         attrs.put( getAttribute( "attr0" ) );
         attrs.put( getAttribute( "attr1" ) );
         attrs.put( getAttribute( "attr2" ) );



Mime
View raw message