directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1065454 - in /directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2: abandonRequest/ authRequest/ authResponse/ batchRequest/ batchResponse/ compareRequest/ compareResponse/ delRequest/ delResponse/ extendedRe...
Date Mon, 31 Jan 2011 00:58:33 GMT
Author: elecharny
Date: Mon Jan 31 00:58:32 2011
New Revision: 1065454

URL: http://svn.apache.org/viewvc?rev=1065454&view=rev
Log:
Fix all the remaining DSML tests

Modified:
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/abandonRequest/AbandonRequestTest.java Mon Jan 31 00:58:32 2011
@@ -33,8 +33,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
-import org.apache.directory.shared.ldap.codec.DefaultLdapCodecService;
-import org.apache.directory.shared.ldap.codec.ILdapCodecService;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.AbandonRequest;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.util.Strings;
@@ -157,7 +156,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString(((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -193,7 +192,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString(((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -229,7 +228,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -265,7 +264,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString(((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -301,7 +300,7 @@ public class AbandonRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authRequest/AuthRequestTest.java Mon Jan 31 00:58:32 2011
@@ -33,6 +33,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.util.Strings;
@@ -153,7 +154,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -188,7 +189,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -223,7 +224,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -257,7 +258,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -292,7 +293,7 @@ public class AuthRequestTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/authResponse/AuthResponseTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.BindResponse;
@@ -123,7 +124,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -158,7 +159,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -193,7 +194,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -228,7 +229,7 @@ public class AuthResponseTest extends Ab
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchRequest/BatchRequestTest.java Mon Jan 31 00:58:32 2011
@@ -33,11 +33,12 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
 import org.apache.directory.shared.dsmlv2.request.BatchRequest;
 import org.apache.directory.shared.ldap.model.message.AbandonRequest;
-import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.AddRequest;
 import org.apache.directory.shared.ldap.model.message.BindRequest;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.model.message.Message;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.model.message.ModifyRequest;
 import org.apache.directory.shared.ldap.model.message.SearchRequest;

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/batchResponse/BatchResponseTest.java Mon Jan 31 00:58:32 2011
@@ -34,9 +34,11 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponse;
 import org.apache.directory.shared.ldap.model.message.AddResponse;
 import org.apache.directory.shared.ldap.model.message.BindResponse;
-import org.apache.directory.shared.ldap.model.message.*;
+import org.apache.directory.shared.ldap.model.message.CompareResponse;
 import org.apache.directory.shared.ldap.model.message.DeleteResponse;
 import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
+import org.apache.directory.shared.ldap.model.message.ModifyResponse;
 import org.apache.directory.shared.ldap.model.message.Response;
 import org.junit.Test;
 import org.junit.runner.RunWith;

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareRequest/CompareRequestTest.java Mon Jan 31 00:58:32 2011
@@ -34,6 +34,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.CompareRequest;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.util.Strings;
@@ -155,7 +156,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -190,7 +191,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -225,7 +226,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -260,7 +261,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -295,7 +296,7 @@ public class CompareRequestTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/CompareResponseTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.CompareResponse;
@@ -124,7 +125,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -159,7 +160,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -194,7 +195,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -229,7 +230,7 @@ public class CompareResponseTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/DelRequestTest.java Mon Jan 31 00:58:32 2011
@@ -33,6 +33,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.DeleteRequest;
 import org.apache.directory.shared.util.Strings;
@@ -152,7 +153,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -187,7 +188,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -222,7 +223,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -256,7 +257,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -291,7 +292,7 @@ public class DelRequestTest extends Abst
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/DelResponseTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -123,7 +124,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -158,7 +159,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -192,7 +193,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -227,7 +228,7 @@ public class DelResponseTest extends Abs
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/ExtendedRequestTest.java Mon Jan 31 00:58:32 2011
@@ -34,6 +34,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
 import org.apache.directory.shared.util.Strings;
@@ -118,7 +119,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -153,7 +154,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -188,7 +189,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -223,7 +224,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -258,7 +259,7 @@ public class ExtendedRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/ExtendedResponseTest.java Mon Jan 31 00:58:32 2011
@@ -37,6 +37,7 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.util.OID;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -126,7 +127,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -161,7 +162,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -196,7 +197,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -231,7 +232,7 @@ public class ExtendedResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/ModifyDNRequestTest.java Mon Jan 31 00:58:32 2011
@@ -33,6 +33,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.message.Control;
 import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
 import org.apache.directory.shared.util.Strings;
@@ -117,7 +118,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -152,7 +153,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -187,7 +188,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -222,7 +223,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -257,7 +258,7 @@ public class ModifyDNRequestTest extends
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/ModifyDNResponseTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -124,7 +125,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -159,7 +160,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -194,7 +195,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -229,7 +230,7 @@ public class ModifyDNResponseTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java Mon Jan 31 00:58:32 2011
@@ -38,6 +38,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
@@ -124,7 +125,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -159,7 +160,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -194,7 +195,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -229,7 +230,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -264,7 +265,7 @@ public class ModifyRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -124,7 +125,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -159,7 +160,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -194,7 +195,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -229,7 +230,7 @@ public class ModifyResponseTest extends 
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java Mon Jan 31 00:58:32 2011
@@ -37,6 +37,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2Parser;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.filter.AndNode;
 import org.apache.directory.shared.ldap.model.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.model.filter.EqualityNode;
@@ -170,7 +171,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -205,7 +206,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "DSMLv2.0 rocks!!", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -240,7 +241,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -275,7 +276,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -310,7 +311,7 @@ public class SearchRequestTest extends A
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java Mon Jan 31 00:58:32 2011
@@ -36,6 +36,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponse;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -88,7 +89,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -124,7 +125,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -160,7 +161,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -196,7 +197,7 @@ public class SearchResultDoneTest extend
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java Mon Jan 31 00:58:32 2011
@@ -36,6 +36,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponse;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.model.entry.Value;
@@ -87,7 +88,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -123,7 +124,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -159,7 +160,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertFalse( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -195,7 +196,7 @@ public class SearchResultEntryTest exten
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java?rev=1065454&r1=1065453&r2=1065454&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java Mon Jan 31 00:58:32 2011
@@ -35,6 +35,7 @@ import org.apache.directory.junit.tools.
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
 import org.apache.directory.shared.dsmlv2.reponse.SearchResponse;
+import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.model.exception.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.model.filter.LdapURL;
 import org.apache.directory.shared.ldap.model.message.Control;
@@ -85,7 +86,7 @@ public class SearchResultReferenceTest e
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertEquals( "Some text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -121,7 +122,7 @@ public class SearchResultReferenceTest e
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.643", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 
@@ -156,7 +157,7 @@ public class SearchResultReferenceTest e
 
         assertNotNull( control );
         assertEquals( "1.2.840.113556.1.4.789", control.getOid() );
-        assertEquals( "Some other text", Strings.utf8ToString((byte[]) getCodec().decorate( control ).getValue()) );
+        assertEquals( "Some other text", Strings.utf8ToString((byte[]) ((ControlDecorator<Control>)control).getValue()) );
     }
 
 
@@ -192,7 +193,7 @@ public class SearchResultReferenceTest e
         assertNotNull( control );
         assertTrue( control.isCritical() );
         assertEquals( "1.2.840.113556.1.4.456", control.getOid() );
-        assertFalse( getCodec().decorate( control ).hasValue() );
+        assertFalse( ((ControlDecorator<Control>)control).hasValue() );
     }
 
 



Mime
View raw message