directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987606 [6/25] - in /directory/shared/trunk: ./ all/ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ asn1/src/main/java/org/apache/directory...
Date Fri, 20 Aug 2010 19:23:37 GMT
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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -31,12 +31,13 @@ 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.compare.CompareRequestCodec;
+import org.apache.directory.shared.ldap.message.CompareRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+
 /**
  * Tests for the Compare Request parsing
  *
@@ -77,9 +78,9 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getName().getNormName() );
     }
 
 
@@ -104,7 +105,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, compareRequest.getMessageId() );
     }
@@ -141,7 +142,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 1, compareRequest.getControls().size() );
 
@@ -176,7 +177,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 1, compareRequest.getControls().size() );
 
@@ -211,7 +212,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 1, compareRequest.getControls().size() );
 
@@ -246,7 +247,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 2, compareRequest.getControls().size() );
 
@@ -281,7 +282,7 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 3, compareRequest.getControls().size() );
 
@@ -316,13 +317,13 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getName().getNormName() );
 
-        assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
+        assertEquals( "sn", compareRequest.getAttributeId() );
 
-        assertEquals( "Johnson", ( String ) compareRequest.getAssertionValue() );
+        assertEquals( "Johnson", compareRequest.getAssertionValue().get() );
     }
 
 
@@ -347,13 +348,13 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getName().getNormName() );
 
-        assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
+        assertEquals( "sn", ( String ) compareRequest.getAttributeId() );
 
-        assertEquals( "DSMLv2.0 rocks!!", new String( ( byte[] ) compareRequest.getAssertionValue() ) );
+        assertEquals( "DSMLv2.0 rocks!!", new String( compareRequest.getAssertionValue().getBytes() ) );
     }
 
 
@@ -378,11 +379,11 @@ public class CompareRequestTest extends 
             fail( e.getMessage() );
         }
 
-        CompareRequestCodec compareRequest = ( CompareRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        CompareRequest compareRequest = ( CompareRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", compareRequest.getName().getNormName() );
 
-        assertEquals( "sn", ( String ) compareRequest.getAttributeDesc() );
+        assertEquals( "sn", compareRequest.getAttributeId() );
 
         assertNull( compareRequest.getAssertionValue() );
     }

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/compareResponse:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -27,15 +27,15 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.apache.directory.junit.tools.Concurrent;
 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.LdapResultCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -75,7 +75,7 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 456, compareResponse.getMessageId() );
     }
@@ -112,7 +112,7 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 1, compareResponse.getControls().size() );
 
@@ -147,7 +147,7 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = compareResponse.getCurrentControl();
 
         assertEquals( 1, compareResponse.getControls().size() );
@@ -178,7 +178,7 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 2, compareResponse.getControls().size() );
 
@@ -213,7 +213,7 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 3, compareResponse.getControls().size() );
 
@@ -268,9 +268,9 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
         assertEquals( ResultCodeEnum.PROTOCOL_ERROR, ldapResult.getResultCode() );
     }
@@ -297,9 +297,9 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
@@ -327,9 +327,9 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
         assertNull( ldapResult.getErrorMessage() );
     }
@@ -356,19 +356,17 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -398,11 +396,11 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 0, referrals.size() );
     }
@@ -429,30 +427,26 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 2, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
             fail();
         }
 
-        Object referral2 = referrals.get( 1 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apple.com/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -482,19 +476,17 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -524,11 +516,11 @@ public class CompareResponseTest extends
             fail( e.getMessage() );
         }
 
-        CompareResponseCodec compareResponse = ( CompareResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = compareResponse.getLdapResult();
+        LdapResult ldapResult = compareResponse.getLdapResult();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDN() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDn().getNormName() );
     }
 
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delRequest:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -30,7 +30,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.del.DelRequestCodec;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
@@ -76,9 +76,9 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", delRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", delRequest.getName().getNormName() );
     }
 
 
@@ -103,7 +103,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, delRequest.getMessageId() );
     }
@@ -139,7 +139,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = delRequest.getCurrentControl();
 
         assertEquals( 1, delRequest.getControls().size() );
@@ -170,7 +170,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = delRequest.getCurrentControl();
 
         assertEquals( 1, delRequest.getControls().size() );
@@ -201,7 +201,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = delRequest.getCurrentControl();
 
         assertEquals( 1, delRequest.getControls().size() );
@@ -231,7 +231,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = delRequest.getCurrentControl();
 
         assertEquals( 2, delRequest.getControls().size() );
@@ -262,7 +262,7 @@ public class DelRequestTest extends Abst
             fail( e.getMessage() );
         }
 
-        DelRequestCodec delRequest = ( DelRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        DeleteRequest delRequest = ( DeleteRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = delRequest.getCurrentControl();
 
         assertEquals( 3, delRequest.getControls().size() );

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/delResponse:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -27,15 +27,15 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.apache.directory.junit.tools.Concurrent;
 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.LdapResultCodec;
-import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -44,7 +44,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 
 
-
 /**
  * Tests for the Del Response parsing
  *
@@ -76,7 +75,7 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 456, delResponse.getMessageId() );
     }
@@ -112,7 +111,7 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 1, delResponse.getControls().size() );
 
@@ -147,7 +146,7 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = delResponse.getCurrentControl();
 
         assertEquals( 1, delResponse.getControls().size() );
@@ -177,7 +176,7 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 2, delResponse.getControls().size() );
 
@@ -212,7 +211,7 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 3, delResponse.getControls().size() );
 
@@ -267,9 +266,9 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
         assertEquals( ResultCodeEnum.PROTOCOL_ERROR, ldapResult.getResultCode() );
     }
@@ -296,9 +295,9 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
@@ -326,9 +325,9 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
         assertNull( ldapResult.getErrorMessage() );
     }
@@ -354,19 +353,17 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -396,11 +393,11 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 0, referrals.size() );
     }
@@ -427,30 +424,26 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 2, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
             fail();
         }
 
-        Object referral2 = referrals.get( 1 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apple.com/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -480,19 +473,17 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -522,11 +513,11 @@ public class DelResponseTest extends Abs
             fail( e.getMessage() );
         }
 
-        DelResponseCodec delResponse = ( DelResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        DeleteResponse delResponse = ( DeleteResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = delResponse.getLdapResult();
+        LdapResult ldapResult = delResponse.getLdapResult();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDN() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDn().getNormName() );
     }
 
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/ErrorResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/ErrorResponseTest.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/ErrorResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/errorResponse/ErrorResponseTest.java Fri Aug 20 19:23:27 2010
@@ -21,6 +21,10 @@
 package org.apache.directory.shared.dsmlv2.errorResponse;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
@@ -30,9 +34,6 @@ import org.apache.directory.shared.dsmlv
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNull;
 
 /**
  * Tests for the Error Response parsing
@@ -114,7 +115,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.NOT_ATTEMPTED, errorResponse.getType() );
+        assertEquals( ErrorResponseType.NOT_ATTEMPTED, errorResponse.getErrorType() );
     }
 
 
@@ -141,7 +142,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.COULD_NOT_CONNECT, errorResponse.getType() );
+        assertEquals( ErrorResponseType.COULD_NOT_CONNECT, errorResponse.getErrorType() );
     }
 
 
@@ -168,7 +169,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.CONNECTION_CLOSED, errorResponse.getType() );
+        assertEquals( ErrorResponseType.CONNECTION_CLOSED, errorResponse.getErrorType() );
     }
 
 
@@ -195,7 +196,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.MALFORMED_REQUEST, errorResponse.getType() );
+        assertEquals( ErrorResponseType.MALFORMED_REQUEST, errorResponse.getErrorType() );
     }
 
 
@@ -222,7 +223,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.GATEWAY_INTERNAL_ERROR, errorResponse.getType() );
+        assertEquals( ErrorResponseType.GATEWAY_INTERNAL_ERROR, errorResponse.getErrorType() );
     }
 
 
@@ -249,7 +250,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.AUTHENTICATION_FAILED, errorResponse.getType() );
+        assertEquals( ErrorResponseType.AUTHENTICATION_FAILED, errorResponse.getErrorType() );
     }
 
 
@@ -276,7 +277,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.UNRESOLVABLE_URI, errorResponse.getType() );
+        assertEquals( ErrorResponseType.UNRESOLVABLE_URI, errorResponse.getErrorType() );
     }
 
 
@@ -303,7 +304,7 @@ public class ErrorResponseTest extends A
 
         ErrorResponse errorResponse = ( ErrorResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( ErrorResponseType.OTHER, errorResponse.getType() );
+        assertEquals( ErrorResponseType.OTHER, errorResponse.getErrorType() );
     }
 
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedRequest:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -31,12 +31,13 @@ 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.extended.ExtendedRequestCodec;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+
 /**
  * Tests for the Extended Request parsing
  *
@@ -67,7 +68,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, extendedRequest.getMessageId() );
     }
@@ -104,7 +105,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -135,7 +136,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -166,7 +167,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 1, extendedRequest.getControls().size() );
@@ -197,7 +198,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 2, extendedRequest.getControls().size() );
@@ -228,7 +229,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = extendedRequest.getCurrentControl();
 
         assertEquals( 3, extendedRequest.getControls().size() );
@@ -259,7 +260,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( "foobar", new String( extendedRequest.getRequestValue() ) );
     }
@@ -286,7 +287,7 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ExtendedRequest extendedRequest = ( ExtendedRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( "DSMLv2.0 rocks!!", new String( extendedRequest.getRequestValue() ) );
     }
@@ -343,7 +344,8 @@ public class ExtendedRequestTest extends
             fail( e.getMessage() );
         }
 
-        ExtendedRequestCodec extendedRequest = ( ExtendedRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        org.apache.directory.shared.ldap.message.ExtendedRequest extendedRequest = ( ExtendedRequest ) parser
+            .getBatchRequest().getCurrentRequest();
         assertNull( extendedRequest.getRequestValue() );
     }
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/extendedResponse:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -27,7 +27,7 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.apache.directory.junit.tools.Concurrent;
 import org.apache.directory.junit.tools.ConcurrentJunitRunner;
@@ -35,9 +35,9 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.dsmlv2.AbstractResponseTest;
 import org.apache.directory.shared.dsmlv2.Dsmlv2ResponseParser;
-import org.apache.directory.shared.ldap.codec.LdapResultCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.LdapResult;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -77,7 +77,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 456, extendedResponse.getMessageId() );
     }
@@ -114,7 +114,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 1, extendedResponse.getControls().size() );
 
@@ -149,7 +149,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = extendedResponse.getCurrentControl();
 
         assertEquals( 1, extendedResponse.getControls().size() );
@@ -180,7 +180,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 2, extendedResponse.getControls().size() );
 
@@ -215,7 +215,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 3, extendedResponse.getControls().size() );
 
@@ -270,9 +270,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
         assertEquals( ResultCodeEnum.PROTOCOL_ERROR, ldapResult.getResultCode() );
     }
@@ -299,9 +299,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
@@ -329,9 +329,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
         assertNull( ldapResult.getErrorMessage() );
     }
@@ -358,19 +358,17 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -400,11 +398,11 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 0, referrals.size() );
     }
@@ -431,30 +429,26 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 2, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
             fail();
         }
 
-        Object referral2 = referrals.get( 1 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apple.com/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -484,19 +478,17 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -526,11 +518,11 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = extendedResponse.getLdapResult();
+        LdapResult ldapResult = extendedResponse.getLdapResult();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDN() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDn().getNormName() );
     }
 
 
@@ -565,7 +557,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         try
         {
@@ -599,7 +591,7 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( "", extendedResponse.getResponseName().toString() );
     }
@@ -636,9 +628,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( "This is a response", extendedResponse.getResponse() );
+        assertEquals( "This is a response", StringTools.utf8ToString( extendedResponse.getResponseValue() ) );
     }
 
 
@@ -663,9 +655,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( "DSMLv2.0 rocks!!", new String( ( byte[] ) extendedResponse.getResponse() ) );
+        assertEquals( "DSMLv2.0 rocks!!", new String( ( byte[] ) extendedResponse.getResponseValue() ) );
     }
 
 
@@ -690,9 +682,9 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( "", extendedResponse.getResponse() );
+        assertEquals( "", StringTools.utf8ToString( extendedResponse.getResponseValue() ) );
     }
 
 
@@ -717,9 +709,10 @@ public class ExtendedResponseTest extend
             fail( e.getMessage() );
         }
 
-        ExtendedResponseCodec extendedResponse = ( ExtendedResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        org.apache.directory.shared.ldap.message.ExtendedResponse extendedResponse = ( ExtendedResponse ) parser
+            .getBatchResponse().getCurrentResponse();
 
-        assertEquals( "This is a response", extendedResponse.getResponse() );
+        assertEquals( "This is a response", StringTools.utf8ToString( extendedResponse.getResponseValue() ) );
 
         try
         {

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNRequest:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -30,12 +30,13 @@ 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.modifyDn.ModifyDNRequestCodec;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+
 /**
  * Tests for the Modify DN Request parsing
  *
@@ -66,7 +67,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, modifyDNRequest.getMessageId() );
     }
@@ -103,7 +104,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyDNRequest.getCurrentControl();
 
         assertEquals( 1, modifyDNRequest.getControls().size() );
@@ -134,7 +135,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyDNRequest.getCurrentControl();
 
         assertEquals( 1, modifyDNRequest.getControls().size() );
@@ -165,7 +166,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyDNRequest.getCurrentControl();
 
         assertEquals( 1, modifyDNRequest.getControls().size() );
@@ -196,7 +197,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyDNRequest.getCurrentControl();
 
         assertEquals( 2, modifyDNRequest.getControls().size() );
@@ -227,7 +228,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyDNRequest.getCurrentControl();
 
         assertEquals( 3, modifyDNRequest.getControls().size() );
@@ -278,11 +279,11 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", modifyDNRequest.getEntry().getNormName() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", modifyDNRequest.getName().getNormName() );
 
-        assertEquals( "cn=Steve Jobs", modifyDNRequest.getNewRDN().getNormName() );
+        assertEquals( "cn=Steve Jobs", modifyDNRequest.getNewRdn().getNormName() );
     }
 
 
@@ -307,9 +308,9 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( modifyDNRequest.isDeleteOldRDN() );
+        assertTrue( modifyDNRequest.getDeleteOldRdn() );
     }
 
 
@@ -334,9 +335,9 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( modifyDNRequest.isDeleteOldRDN() );
+        assertTrue( modifyDNRequest.getDeleteOldRdn() );
     }
 
 
@@ -361,9 +362,9 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertFalse( modifyDNRequest.isDeleteOldRDN() );
+        assertFalse( modifyDNRequest.getDeleteOldRdn() );
     }
 
 
@@ -388,9 +389,9 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertFalse( modifyDNRequest.isDeleteOldRDN() );
+        assertFalse( modifyDNRequest.getDeleteOldRdn() );
     }
 
 
@@ -425,7 +426,7 @@ public class ModifyDNRequestTest extends
             fail( e.getMessage() );
         }
 
-        ModifyDNRequestCodec modifyDNRequest = ( ModifyDNRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( "cn=Steve Jobs,ou=Dev,dc=apple,dc=com", modifyDNRequest.getNewSuperior().getNormName() );
     }

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modDNResponse:980350-980351

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=987606&r1=987605&r2=987606&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 Fri Aug 20 19:23:27 2010
@@ -27,15 +27,15 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.List;
+import java.util.Collection;
 
 import org.apache.directory.junit.tools.Concurrent;
 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.LdapResultCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -75,7 +75,7 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 456, modifyDNResponse.getMessageId() );
     }
@@ -112,7 +112,7 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 1, modifyDNResponse.getControls().size() );
 
@@ -147,7 +147,7 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = modifyDNResponse.getCurrentControl();
 
         assertEquals( 1, modifyDNResponse.getControls().size() );
@@ -178,7 +178,7 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 2, modifyDNResponse.getControls().size() );
 
@@ -213,7 +213,7 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 3, modifyDNResponse.getControls().size() );
 
@@ -268,9 +268,9 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
         assertEquals( ResultCodeEnum.PROTOCOL_ERROR, ldapResult.getResultCode() );
     }
@@ -297,9 +297,9 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
@@ -327,9 +327,9 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
         assertNull( ldapResult.getErrorMessage() );
     }
@@ -356,19 +356,17 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -398,11 +396,11 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 0, referrals.size() );
     }
@@ -429,30 +427,26 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 2, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
             fail();
         }
 
-        Object referral2 = referrals.get( 1 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apple.com/" ).toString(), referral2.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apple.com/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -482,19 +476,17 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
-        List<org.apache.directory.shared.ldap.util.LdapURL> referrals = ldapResult.getReferrals();
+        Collection<String> referrals = ldapResult.getReferral().getLdapUrls();
 
         assertEquals( 1, referrals.size() );
 
-        Object referral = referrals.get( 0 );
-
         try
         {
-            assertEquals( new LdapURL( "ldap://www.apache.org/" ).toString(), referral.toString() );
+            assertTrue( referrals.contains( new LdapURL( "ldap://www.apache.org/" ).toString() ) );
         }
         catch ( LdapURLEncodingException e )
         {
@@ -524,11 +516,11 @@ public class ModifyDNResponseTest extend
             fail( e.getMessage() );
         }
 
-        ModifyDNResponseCodec modifyDNResponse = ( ModifyDNResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyDnResponse modifyDNResponse = ( ModifyDnResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyDNResponse.getLdapResult();
+        LdapResult ldapResult = modifyDNResponse.getLdapResult();
 
-        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDN() );
+        assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", ldapResult.getMatchedDn().getNormName() );
     }
 
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,7 @@
-/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest:980350-980351



Mime
View raw message