directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1065306 [3/3] - in /directory/shared/trunk: dsml-engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/ dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/rep...
Date Sun, 30 Jan 2011 15:42:39 GMT
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/controls/replication/SyncModifyDnControlTest.java
Sun Jan 30 15:42:36 2011
@@ -31,7 +31,8 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
 import org.apache.directory.shared.asn1.EncoderException;
-import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.ISyncModifyDn;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncmodifydn.SyncModifyDnDecorator;
 import org.apache.directory.shared.util.Strings;
 import org.junit.Test;
@@ -47,6 +48,8 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class SyncModifyDnControlTest
 {
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
     
     @Test
     public void testDecodeSyncModifyDnControlWithMoveOperation() throws Exception
@@ -61,7 +64,8 @@ public class SyncModifyDnControlTest
             } );
         bb.flip();
 
-        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator();
+        SyncModifyDnContainer container = new SyncModifyDnContainer( codec );
+        SyncModifyDnDecorator decorator = container.getSyncModifyDnControl();
 
         ISyncModifyDn syncmodDnControl = (ISyncModifyDn)decorator.decode( bb.array() );
 
@@ -113,7 +117,8 @@ public class SyncModifyDnControlTest
             } );
         bb.flip();
 
-        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator();
+        SyncModifyDnContainer container = new SyncModifyDnContainer( codec );
+        SyncModifyDnDecorator decorator = container.getSyncModifyDnControl();
 
         ISyncModifyDn syncmodDnControl = (ISyncModifyDn)decorator.decode( bb.array() );
 
@@ -167,7 +172,8 @@ public class SyncModifyDnControlTest
             } );
         bb.flip();
 
-        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator();
+        SyncModifyDnContainer container = new SyncModifyDnContainer( codec );
+        SyncModifyDnDecorator decorator = container.getSyncModifyDnControl();
 
         ISyncModifyDn syncmodDnControl = (ISyncModifyDn)decorator.decode( bb.array() );
 
@@ -220,8 +226,8 @@ public class SyncModifyDnControlTest
             } );
         bb.flip();
 
-        SyncModifyDnDecorator decorator = new SyncModifyDnDecorator();
-        
+        SyncModifyDnContainer container = new SyncModifyDnContainer( codec );
+        SyncModifyDnDecorator decorator = container.getSyncModifyDnControl();
         decorator.decode( bb.array() );
     }
 }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/EntryChangeControlTest.java
Sun Jan 30 15:42:36 2011
@@ -28,7 +28,9 @@ import java.nio.ByteBuffer;
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
-import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeDecorator;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
+import org.apache.directory.shared.ldap.codec.search.controls.entryChange.*;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 import org.apache.directory.shared.ldap.model.message.controls.EntryChange;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -46,6 +48,9 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class EntryChangeControlTest
 {
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
+    
     /**
      * Test the decoding of a EntryChangeControl
      */
@@ -64,7 +69,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
@@ -93,7 +99,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
@@ -121,7 +128,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
@@ -152,7 +160,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -175,7 +184,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         EntryChange entryChange = (EntryChange)decorator.decode( bb.array() );
 
@@ -203,7 +213,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -229,7 +240,8 @@ public class EntryChangeControlTest
             } );
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeContainer container = new EntryChangeContainer( codec );
+        EntryChangeDecorator decorator = container.getEntryChangeDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -261,7 +273,7 @@ public class EntryChangeControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
 
         EntryChange entryChange = (EntryChange) decorator.getDecorated();
         entryChange.setChangeType( ChangeType.MODDN );
@@ -300,7 +312,7 @@ public class EntryChangeControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        EntryChangeDecorator decorator = new EntryChangeDecorator();
+        EntryChangeDecorator decorator = new EntryChangeDecorator( codec );
         
         EntryChange entryChange = (EntryChange) decorator.getDecorated();
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PSearchControlTest.java
Sun Jan 30 15:42:36 2011
@@ -28,6 +28,10 @@ import java.nio.ByteBuffer;
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
+import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.ChangeType;
 import org.apache.directory.shared.ldap.model.message.controls.PersistentSearch;
@@ -45,6 +49,9 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class PSearchControlTest
 {
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
+    
     /**
      * Test encoding of a PSearchControl.
      * @throws Exception on error
@@ -70,7 +77,7 @@ public class PSearchControlTest
         String expected = Strings.dumpBytes(bb.array());
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchDecorator decorator = new PersistentSearchDecorator(  codec );
         PersistentSearch ctrl = ( PersistentSearch ) decorator.getDecorated();
         ctrl.setChangesOnly( false );
         ctrl.setReturnECs( false );
@@ -96,7 +103,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         PersistentSearch ctrl = ( PersistentSearch )decorator.decode( bb.array() );
 
@@ -125,7 +133,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }
@@ -147,7 +156,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }
@@ -166,7 +176,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }
@@ -187,7 +198,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }
@@ -208,7 +220,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }
@@ -229,7 +242,8 @@ public class PSearchControlTest
             } );
         bb.flip();
 
-        PersistentSearchDecorator decorator = new PersistentSearchDecorator();
+        PersistentSearchContainer container = new PersistentSearchContainer( codec );
+        PersistentSearchDecorator decorator = container.getPersistentSearchDecorator();
 
         decorator.decode( bb.array() );
     }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/controls/PagedSearchControlTest.java
Sun Jan 30 15:42:36 2011
@@ -30,6 +30,9 @@ import java.util.Arrays;
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.asn1.DecoderException;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
+import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsContainer;
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsDecorator;
 import org.apache.directory.shared.ldap.model.message.controls.PagedResults;
 import org.apache.directory.shared.util.Strings;
@@ -46,6 +49,9 @@ import org.junit.runner.RunWith;
 @Concurrent()
 public class PagedSearchControlTest
 {
+    private ILdapCodecService codec = new DefaultLdapCodecService();
+    
+    
     /**
      * Test encoding of a PagedSearchControl.
      */
@@ -61,7 +67,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
 
@@ -86,7 +93,7 @@ public class PagedSearchControlTest
             } );
         buffer.flip();
 
-        PagedResultsDecorator ctrl = new PagedResultsDecorator();
+        PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( 32 );
         ctrl.setCookie( Strings.getBytesUtf8("test") );
 
@@ -111,7 +118,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -131,7 +139,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -150,7 +159,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -171,7 +181,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
 
@@ -197,7 +208,7 @@ public class PagedSearchControlTest
             } );
         buffer.flip();
 
-        PagedResultsDecorator ctrl = new PagedResultsDecorator();
+        PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( -1 );
         ctrl.setCookie( Strings.getBytesUtf8("test") );
 
@@ -223,7 +234,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         decorator.decode( bb.array() );
     }
@@ -244,7 +256,8 @@ public class PagedSearchControlTest
             } );
         bb.flip();
 
-        PagedResultsDecorator decorator = new PagedResultsDecorator();
+        PagedResultsContainer container = new PagedResultsContainer( codec );
+        PagedResultsDecorator decorator = container.getDecorator();
         
         PagedResults pagedSearch = (PagedResults)decorator.decode( bb.array() );
 
@@ -266,7 +279,7 @@ public class PagedSearchControlTest
             } );
         buffer.flip();
 
-        PagedResultsDecorator ctrl = new PagedResultsDecorator();
+        PagedResultsDecorator ctrl = new PagedResultsDecorator( codec );
         ctrl.setSize( 32 );
         ctrl.setCookie( null );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java?rev=1065306&r1=1065305&r2=1065306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/model/ldif/LdifUtilsTest.java
Sun Jan 30 15:42:36 2011
@@ -22,6 +22,8 @@ package org.apache.directory.shared.ldap
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
+import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
+import org.apache.directory.shared.ldap.codec.ILdapCodecService;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITDecorator;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
@@ -540,7 +542,8 @@ public class LdifUtilsTest
         entry.addAttribute( "m-oid", "1.2.3.4" );
         entry.addAttribute( "m-description", "description" );
         
-        ManageDsaITDecorator control = new ManageDsaITDecorator();
+        ILdapCodecService codec = new DefaultLdapCodecService();
+        ManageDsaITDecorator control = new ManageDsaITDecorator( codec );
         
         entry.addControl( control );
         



Mime
View raw message