directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1065452 - in /directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2: addRequest/AddRequestTest.java addResponse/AddResponseTest.java
Date Mon, 31 Jan 2011 00:52:55 GMT
Author: elecharny
Date: Mon Jan 31 00:52:55 2011
New Revision: 1065452

URL: http://svn.apache.org/viewvc?rev=1065452&view=rev
Log:
Fixing errors in DSML

Modified:
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=1065452&r1=1065451&r2=1065452&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
(original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
Mon Jan 31 00:52:55 2011
@@ -193,7 +193,7 @@ public class AddRequestTest 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( ((ControlDecorator<Control>)control).getValue())
);
     }
 
 
@@ -228,7 +228,7 @@ public class AddRequestTest 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() );
     }
 
 
@@ -262,7 +262,7 @@ public class AddRequestTest 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( ((ControlDecorator<Control>)control).getValue())
);
     }
 
 
@@ -297,7 +297,7 @@ public class AddRequestTest 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/addResponse/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java?rev=1065452&r1=1065451&r2=1065452&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
(original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addResponse/AddResponseTest.java
Mon Jan 31 00:52:55 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.AddResponse;
@@ -123,7 +124,7 @@ public class AddResponseTest 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(((ControlDecorator<Control>)control).getValue())
);
     }
 
 
@@ -158,7 +159,7 @@ public class AddResponseTest 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 AddResponseTest 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( ((ControlDecorator<Control>)control).getValue()
) );
     }
 
 
@@ -227,7 +228,7 @@ public class AddResponseTest 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() );
     }
 
 



Mime
View raw message