directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987606 [7/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/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyRequest/ModifyRequestTest.java Fri Aug 20 19:23:27 2010
@@ -27,7 +27,8 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import java.io.UnsupportedEncodingException;
-import java.util.List;
+import java.util.Collection;
+import java.util.Iterator;
 
 import javax.naming.NamingException;
 
@@ -35,15 +36,16 @@ 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.LdapConstants;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
 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 Request parsing
  *
@@ -74,7 +76,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, modifyRequest.getMessageId() );
     }
@@ -110,7 +112,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyRequest.getCurrentControl();
 
         assertEquals( 1, modifyRequest.getControls().size() );
@@ -141,7 +143,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyRequest.getCurrentControl();
 
         assertEquals( 1, modifyRequest.getControls().size() );
@@ -172,7 +174,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyRequest.getCurrentControl();
 
         assertEquals( 1, modifyRequest.getControls().size() );
@@ -203,7 +205,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyRequest.getCurrentControl();
 
         assertEquals( 2, modifyRequest.getControls().size() );
@@ -234,7 +236,7 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = modifyRequest.getCurrentControl();
 
         assertEquals( 3, modifyRequest.getControls().size() );
@@ -276,20 +278,17 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
-
-        assertEquals( "directreport", modifyRequest.getCurrentAttributeType() );
-
-        List<Modification> modifications = modifyRequest.getModifications();
-
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
+        Collection<Modification> modifications = modifyRequest.getModifications();
         assertEquals( 1, modifications.size() );
 
-        Modification modification = ( Modification ) modifications.get( 0 );
+        Modification modification = modifications.iterator().next();
+
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
 
         EntryAttribute attribute = modification.getAttribute();
 
+        assertEquals( "directreport", attribute.getId() );
         assertEquals( "CN=John Smith, DC=microsoft, DC=com", attribute.get( 0 ).getString() );
     }
 
@@ -317,20 +316,18 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
-
-        assertEquals( "directreport", modifyRequest.getCurrentAttributeType() );
-
-        List<Modification> modifications = modifyRequest.getModifications();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
+        Collection<Modification> modifications = modifyRequest.getModifications();
         assertEquals( 1, modifications.size() );
 
-        Modification modification = ( Modification ) modifications.get( 0 );
-
+        Modification modification = modifications.iterator().next();
         EntryAttribute attribute = modification.getAttribute();
 
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
+
+        assertEquals( "directreport", attribute.getId() );
+
         String expected = new String( new byte[]
             { 'c', 'n', '=', 'E', 'm', 'm', 'a', 'n', 'u', 'e', 'l', ' ', 'L', ( byte ) 0xc3, ( byte ) 0xa9, 'c', 'h',
                 'a', 'r', 'n', 'y', ',', ' ', 'o', 'u', '=', 'p', 'e', 'o', 'p', 'l', 'e', ',', ' ', 'd', 'c', '=',
@@ -362,19 +359,27 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.OPERATION_REPLACE, modifyRequest.getCurrentOperation() );
+        Collection<Modification> modifications = modifyRequest.getModifications();
+        assertEquals( 2, modifications.size() );
 
-        assertEquals( "sn", modifyRequest.getCurrentAttributeType() );
+        Iterator<Modification> iter = modifications.iterator();
 
-        List<Modification> modifications = modifyRequest.getModifications();
+        Modification modification = iter.next();
 
-        assertEquals( 2, modifications.size() );
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
+        EntryAttribute attribute = modification.getAttribute();
+        assertEquals( "directreport", attribute.getId() );
 
-        Modification modification = ( Modification ) modifications.get( 1 );
+        assertEquals( "CN=John Smith, DC=microsoft, DC=com", attribute.get( 0 ).getString() );
 
-        EntryAttribute attribute = modification.getAttribute();
+        modification = iter.next();
+
+        attribute = modification.getAttribute();
+
+        assertEquals( "sn", attribute.getId() );
+        assertEquals( ModificationOperation.REPLACE_ATTRIBUTE, modification.getOperation() );
 
         assertEquals( "CN=Steve Jobs, DC=apple, DC=com", attribute.get( 0 ).getString() );
     }
@@ -422,9 +427,14 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
+        Collection<Modification> modifications = modifyRequest.getModifications();
+        assertEquals( 1, modifications.size() );
+
+        Modification modification = modifications.iterator().next();
+
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
     }
 
 
@@ -450,9 +460,14 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
+
+        Collection<Modification> modifications = modifyRequest.getModifications();
+        assertEquals( 1, modifications.size() );
+
+        Modification modification = modifications.iterator().next();
 
-        assertEquals( LdapConstants.OPERATION_DELETE, modifyRequest.getCurrentOperation() );
+        assertEquals( ModificationOperation.REMOVE_ATTRIBUTE, modification.getOperation() );
     }
 
 
@@ -478,9 +493,14 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.OPERATION_REPLACE, modifyRequest.getCurrentOperation() );
+        Collection<Modification> modifications = modifyRequest.getModifications();
+        assertEquals( 1, modifications.size() );
+
+        Modification modification = modifications.iterator().next();
+
+        assertEquals( ModificationOperation.REPLACE_ATTRIBUTE, modification.getOperation() );
     }
 
 
@@ -516,18 +536,17 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
-
-        assertEquals( "directreport", modifyRequest.getCurrentAttributeType() );
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        List<Modification> modifications = modifyRequest.getModifications();
+        Collection<Modification> modifications = modifyRequest.getModifications();
+        assertEquals( 1, modifications.size() );
 
-        Modification modification = ( Modification ) modifications.get( 0 );
+        Modification modification = modifications.iterator().next();
 
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
         EntryAttribute attribute = modification.getAttribute();
 
+        assertEquals( "directreport", attribute.getId() );
         assertEquals( 0, attribute.size() );
     }
 
@@ -554,20 +573,18 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
-
-        assertEquals( "directreport", modifyRequest.getCurrentAttributeType() );
-
-        List<Modification> modifications = modifyRequest.getModifications();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
+        Collection<Modification> modifications = modifyRequest.getModifications();
         assertEquals( 1, modifications.size() );
 
-        Modification modification = ( Modification ) modifications.get( 0 );
+        Modification modification = modifications.iterator().next();
 
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
         EntryAttribute attribute = modification.getAttribute();
 
+        assertEquals( "directreport", attribute.getId() );
+
         assertEquals( 2, attribute.size() );
         assertEquals( "CN=John Smith, DC=microsoft, DC=com", attribute.get( 0 ).getString() );
         assertEquals( "CN=Steve Jobs, DC=apple, DC=com", attribute.get( 1 ).getString() );
@@ -596,20 +613,18 @@ public class ModifyRequestTest extends A
             fail( e.getMessage() );
         }
 
-        ModifyRequestCodec modifyRequest = ( ModifyRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        assertEquals( LdapConstants.OPERATION_ADD, modifyRequest.getCurrentOperation() );
-
-        assertEquals( "directreport", modifyRequest.getCurrentAttributeType() );
-
-        List<Modification> modifications = modifyRequest.getModifications();
+        ModifyRequest modifyRequest = ( ModifyRequest ) parser.getBatchRequest().getCurrentRequest();
 
+        Collection<Modification> modifications = modifyRequest.getModifications();
         assertEquals( 1, modifications.size() );
 
-        Modification modification = ( Modification ) modifications.get( 0 );
+        Modification modification = modifications.iterator().next();
 
+        assertEquals( ModificationOperation.ADD_ATTRIBUTE, modification.getOperation() );
         EntryAttribute attribute = modification.getAttribute();
 
+        assertEquals( "directreport", attribute.getId() );
+
         assertEquals( 1, attribute.size() );
         assertEquals( "", attribute.get( 0 ).getString() );
     }

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/
------------------------------------------------------------------------------
--- 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/modifyResponse:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyResponse:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/modifyResponse/ModifyResponseTest.java 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.modify.ModifyResponseCodec;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.LdapResult;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
 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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 456, modifyResponse.getMessageId() );
     }
@@ -112,7 +112,7 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 1, modifyResponse.getControls().size() );
 
@@ -147,7 +147,7 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = modifyResponse.getCurrentControl();
 
         assertEquals( 1, modifyResponse.getControls().size() );
@@ -178,7 +178,7 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 2, modifyResponse.getControls().size() );
 
@@ -213,7 +213,7 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
         assertEquals( 3, modifyResponse.getControls().size() );
 
@@ -268,9 +268,9 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.getLdapResult();
 
         assertEquals( ResultCodeEnum.PROTOCOL_ERROR, ldapResult.getResultCode() );
     }
@@ -297,9 +297,9 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.getLdapResult();
 
         assertNull( ldapResult.getErrorMessage() );
     }
@@ -356,19 +356,17 @@ public class ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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 ModifyResponseTest extends 
             fail( e.getMessage() );
         }
 
-        ModifyResponseCodec modifyResponse = ( ModifyResponseCodec ) parser.getBatchResponse().getCurrentResponse();
+        ModifyResponse modifyResponse = ( ModifyResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        LdapResultCodec ldapResult = modifyResponse.getLdapResult();
+        LdapResult ldapResult = modifyResponse.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/searchRequest/
------------------------------------------------------------------------------
--- 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/searchRequest:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchRequest:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest:980350-980351

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java (original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchRequest/SearchRequestTest.java Fri Aug 20 19:23:27 2010
@@ -35,24 +35,26 @@ 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.AttributeValueAssertion;
-import org.apache.directory.shared.ldap.codec.LdapConstants;
-import org.apache.directory.shared.ldap.codec.search.AndFilter;
-import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
-import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
-import org.apache.directory.shared.ldap.codec.search.Filter;
-import org.apache.directory.shared.ldap.codec.search.NotFilter;
-import org.apache.directory.shared.ldap.codec.search.OrFilter;
-import org.apache.directory.shared.ldap.codec.search.PresentFilter;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
-import org.apache.directory.shared.ldap.codec.search.SubstringFilter;
-import org.apache.directory.shared.ldap.entry.EntryAttribute;
+import org.apache.directory.shared.ldap.filter.AndNode;
+import org.apache.directory.shared.ldap.filter.ApproximateNode;
+import org.apache.directory.shared.ldap.filter.EqualityNode;
+import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.shared.ldap.filter.ExtensibleNode;
+import org.apache.directory.shared.ldap.filter.GreaterEqNode;
+import org.apache.directory.shared.ldap.filter.LessEqNode;
+import org.apache.directory.shared.ldap.filter.NotNode;
+import org.apache.directory.shared.ldap.filter.OrNode;
+import org.apache.directory.shared.ldap.filter.PresenceNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
+import org.apache.directory.shared.ldap.filter.SubstringNode;
+import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.message.SearchRequest;
 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 Del Request parsing
  *
@@ -93,9 +95,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( "ou=marketing,dc=microsoft,dc=com", searchRequest.getBaseObject().toString() );
+        assertEquals( "ou=marketing,dc=microsoft,dc=com", searchRequest.getBase().getName() );
     }
 
 
@@ -120,7 +122,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 456, searchRequest.getMessageId() );
     }
@@ -156,7 +158,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = searchRequest.getCurrentControl();
 
         assertEquals( 1, searchRequest.getControls().size() );
@@ -187,7 +189,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = searchRequest.getCurrentControl();
 
         assertEquals( 1, searchRequest.getControls().size() );
@@ -218,7 +220,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = searchRequest.getCurrentControl();
 
         assertEquals( 1, searchRequest.getControls().size() );
@@ -249,7 +251,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = searchRequest.getCurrentControl();
 
         assertEquals( 2, searchRequest.getControls().size() );
@@ -280,7 +282,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = searchRequest.getCurrentControl();
 
         assertEquals( 3, searchRequest.getControls().size() );
@@ -332,7 +334,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( SearchScope.OBJECT, searchRequest.getScope() );
     }
@@ -360,7 +362,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( SearchScope.ONELEVEL, searchRequest.getScope() );
     }
@@ -388,7 +390,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( SearchScope.SUBTREE, searchRequest.getScope() );
     }
@@ -436,9 +438,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.DEREF_ALWAYS, searchRequest.getDerefAliases() );
+        assertEquals( AliasDerefMode.DEREF_ALWAYS, searchRequest.getDerefAliases() );
     }
 
 
@@ -464,9 +466,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.DEREF_FINDING_BASE_OBJ, searchRequest.getDerefAliases() );
+        assertEquals( AliasDerefMode.DEREF_FINDING_BASE_OBJ, searchRequest.getDerefAliases() );
     }
 
 
@@ -492,9 +494,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.DEREF_IN_SEARCHING, searchRequest.getDerefAliases() );
+        assertEquals( AliasDerefMode.DEREF_IN_SEARCHING, searchRequest.getDerefAliases() );
     }
 
 
@@ -520,9 +522,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertEquals( LdapConstants.NEVER_DEREF_ALIASES, searchRequest.getDerefAliases() );
+        assertEquals( AliasDerefMode.NEVER_DEREF_ALIASES, searchRequest.getDerefAliases() );
     }
 
 
@@ -559,7 +561,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 1000, searchRequest.getSizeLimit() );
     }
@@ -598,7 +600,7 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
         assertEquals( 60, searchRequest.getTimeLimit() );
     }
@@ -636,9 +638,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( searchRequest.isTypesOnly() );
+        assertTrue( searchRequest.getTypesOnly() );
     }
 
 
@@ -663,9 +665,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( searchRequest.isTypesOnly() );
+        assertTrue( searchRequest.getTypesOnly() );
     }
 
 
@@ -690,9 +692,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertFalse( searchRequest.isTypesOnly() );
+        assertFalse( searchRequest.getTypesOnly() );
     }
 
 
@@ -717,9 +719,9 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertFalse( searchRequest.isTypesOnly() );
+        assertFalse( searchRequest.getTypesOnly() );
     }
 
 
@@ -800,13 +802,13 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        List<EntryAttribute> attributes = searchRequest.getAttributes();
+        List<String> attributes = searchRequest.getAttributes();
         assertEquals( 1, attributes.size() );
 
-        EntryAttribute attribute = attributes.get( 0 );
-        assertEquals( "sn", attribute.getUpId() );
+        String attribute = attributes.get( 0 );
+        assertEquals( "sn", attribute );
     }
 
 
@@ -832,16 +834,16 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        List<EntryAttribute> attributes = searchRequest.getAttributes();
+        List<String> attributes = searchRequest.getAttributes();
         assertEquals( 2, attributes.size() );
 
-        EntryAttribute attribute1 = attributes.get( 0 );
-        assertEquals( "sn", attribute1.getUpId() );
+        String attribute1 = attributes.get( 0 );
+        assertEquals( "sn", attribute1 );
 
-        EntryAttribute attribute2 = attributes.get( 1 );
-        assertEquals( "givenName", attribute2.getUpId() );
+        String attribute2 = attributes.get( 1 );
+        assertEquals( "givenName", attribute2 );
     }
 
 
@@ -886,11 +888,11 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof AndFilter );
+        assertTrue( filter instanceof AndNode );
     }
 
 
@@ -915,11 +917,11 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof OrFilter );
+        assertTrue( filter instanceof OrNode );
     }
 
 
@@ -944,11 +946,11 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof NotFilter );
+        assertTrue( filter instanceof NotNode );
     }
 
 
@@ -983,21 +985,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        ExprNode filter = searchRequest.getFilter();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        assertTrue( filter instanceof ApproximateNode );
 
-        assertEquals( LdapConstants.APPROX_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        ApproximateNode approxMatchFilter = ( ApproximateNode ) filter;
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        assertEquals( "sn", approxMatchFilter.getAttribute() );
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "foobar", assertion.getAssertionValue().getString() );
+        assertEquals( "foobar", approxMatchFilter.getValue().getString() );
     }
 
 
@@ -1022,21 +1020,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        ExprNode filter = searchRequest.getFilter();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        assertTrue( filter instanceof ApproximateNode );
 
-        assertEquals( LdapConstants.APPROX_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        ApproximateNode approxMatchFilter = ( ApproximateNode ) filter;
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        assertEquals( "sn", approxMatchFilter.getAttribute() );
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "DSMLv2.0 rocks!!", assertion.getAssertionValue().getString() );
+        assertEquals( "DSMLv2.0 rocks!!", approxMatchFilter.getValue().getString() );
     }
 
 
@@ -1061,21 +1055,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
-
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        ExprNode filter = searchRequest.getFilter();
 
-        assertEquals( LdapConstants.APPROX_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        assertTrue( filter instanceof ApproximateNode );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        ApproximateNode approxMatchFilter = ( ApproximateNode ) filter;
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
+        assertEquals( "sn", approxMatchFilter.getAttribute() );
 
-        assertNull( assertion.getAssertionValue() );
+        assertNull( approxMatchFilter.getValue() );
     }
 
 
@@ -1130,21 +1120,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        assertTrue( filter instanceof GreaterEqNode );
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        GreaterEqNode greaterEqFilter = ( GreaterEqNode ) filter;
 
-        assertEquals( LdapConstants.GREATER_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        assertEquals( "sn", greaterEqFilter.getAttribute() );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
-
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "foobar", assertion.getAssertionValue().getString() );
+        assertEquals( "foobar", greaterEqFilter.getValue().getString() );
     }
 
 
@@ -1169,21 +1155,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        ExprNode filter = searchRequest.getFilter();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        assertTrue( filter instanceof GreaterEqNode );
 
-        assertEquals( LdapConstants.GREATER_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        GreaterEqNode greaterEqFilter = ( GreaterEqNode ) filter;
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        assertEquals( "sn", greaterEqFilter.getAttribute() );
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "DSMLv2.0 rocks!!", assertion.getAssertionValue().getString() );
+        assertEquals( "DSMLv2.0 rocks!!", greaterEqFilter.getValue().getString() );
     }
 
 
@@ -1208,21 +1190,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
-
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        ExprNode filter = searchRequest.getFilter();
 
-        assertEquals( LdapConstants.GREATER_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        assertTrue( filter instanceof GreaterEqNode );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        GreaterEqNode greaterEqFilter = ( GreaterEqNode ) filter;
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
+        assertEquals( "sn", greaterEqFilter.getAttribute() );
 
-        assertNull( assertion.getAssertionValue() );
+        assertNull( greaterEqFilter.getValue() );
     }
 
 
@@ -1277,21 +1255,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        assertTrue( filter instanceof LessEqNode );
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        LessEqNode lessOrEqFilter = ( LessEqNode ) filter;
 
-        assertEquals( LdapConstants.LESS_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        assertEquals( "sn", lessOrEqFilter.getAttribute() );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
-
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "foobar", assertion.getAssertionValue().getString() );
+        assertEquals( "foobar", lessOrEqFilter.getValue().getString() );
     }
 
 
@@ -1316,21 +1290,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
-
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        ExprNode filter = searchRequest.getFilter();
 
-        assertEquals( LdapConstants.LESS_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        assertTrue( filter instanceof LessEqNode );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        LessEqNode lessOrEqFilter = ( LessEqNode ) filter;
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
+        assertEquals( "sn", lessOrEqFilter.getAttribute() );
 
-        assertEquals( "DSMLv2.0 rocks!!", assertion.getAssertionValue().getString() );
+        assertEquals( "DSMLv2.0 rocks!!", lessOrEqFilter.getValue().getString() );
     }
 
 
@@ -1355,21 +1325,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        assertTrue( filter instanceof LessEqNode );
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        LessEqNode lessOrEqFilter = ( LessEqNode ) filter;
 
-        assertEquals( LdapConstants.LESS_OR_EQUAL_FILTER, approxMatchFilter.getFilterType() );
+        assertEquals( "sn", lessOrEqFilter.getAttribute() );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
-
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertNull( assertion.getAssertionValue() );
+        assertNull( lessOrEqFilter.getValue() );
     }
 
 
@@ -1424,21 +1390,16 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        ExprNode filter = searchRequest.getFilter();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        assertTrue( filter instanceof EqualityNode );
 
-        assertEquals( LdapConstants.EQUALITY_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        EqualityNode equalityFilter = ( EqualityNode ) filter;
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
-
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "foobar", assertion.getAssertionValue().getString() );
+        assertEquals( "sn", equalityFilter.getAttribute() );
+        assertEquals( "foobar", equalityFilter.getValue().getString() );
     }
 
 
@@ -1463,21 +1424,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        ExprNode filter = searchRequest.getFilter();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        assertTrue( filter instanceof EqualityNode );
 
-        assertEquals( LdapConstants.EQUALITY_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        EqualityNode equalityFilter = ( EqualityNode ) filter;
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        assertEquals( "sn", equalityFilter.getAttribute() );
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
-
-        assertEquals( "DSMLv2.0 rocks!!", assertion.getAssertionValue().getString() );
+        assertEquals( "DSMLv2.0 rocks!!", equalityFilter.getValue().getString() );
     }
 
 
@@ -1502,21 +1459,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
-
-        Filter filter = searchRequest.getFilter();
-
-        assertTrue( filter instanceof AttributeValueAssertionFilter );
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        AttributeValueAssertionFilter approxMatchFilter = ( AttributeValueAssertionFilter ) filter;
+        ExprNode filter = searchRequest.getFilter();
 
-        assertEquals( LdapConstants.EQUALITY_MATCH_FILTER, approxMatchFilter.getFilterType() );
+        assertTrue( filter instanceof EqualityNode );
 
-        AttributeValueAssertion assertion = approxMatchFilter.getAssertion();
+        EqualityNode equalityFilter = ( EqualityNode ) filter;
 
-        assertEquals( "sn", assertion.getAttributeDesc() );
+        assertEquals( "sn", equalityFilter.getAttribute() );
 
-        assertNull( assertion.getAssertionValue() );
+        assertNull( equalityFilter.getValue() );
     }
 
 
@@ -1571,15 +1524,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof PresentFilter );
+        assertTrue( filter instanceof PresenceNode );
 
-        PresentFilter presentFilter = ( PresentFilter ) filter;
+        PresenceNode presentFilter = ( PresenceNode ) filter;
 
-        assertEquals( "givenName", presentFilter.getAttributeDescription().toString() );
+        assertEquals( "givenName", presentFilter.getAttribute() );
     }
 
 
@@ -1614,17 +1567,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertEquals( "A Value", extensibleMatchFilter.getMatchValue().getString() );
+        assertEquals( "A Value", extensibleMatchFilter.getValue().getString() );
 
-        assertEquals( false, extensibleMatchFilter.isDnAttributes() );
+        assertEquals( false, extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1649,17 +1602,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertEquals( "DSMLv2.0 rocks!!", extensibleMatchFilter.getMatchValue().getString() );
+        assertEquals( "DSMLv2.0 rocks!!", extensibleMatchFilter.getValue().getString() );
 
-        assertEquals( false, extensibleMatchFilter.isDnAttributes() );
+        assertEquals( false, extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1684,17 +1637,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertNull( extensibleMatchFilter.getMatchValue() );
+        assertNull( extensibleMatchFilter.getValue() );
 
-        assertEquals( false, extensibleMatchFilter.isDnAttributes() );
+        assertEquals( false, extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1739,15 +1692,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertTrue( extensibleMatchFilter.isDnAttributes() );
+        assertTrue( extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1772,15 +1725,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertTrue( extensibleMatchFilter.isDnAttributes() );
+        assertTrue( extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1805,15 +1758,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertFalse( extensibleMatchFilter.isDnAttributes() );
+        assertFalse( extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1838,15 +1791,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertFalse( extensibleMatchFilter.isDnAttributes() );
+        assertFalse( extensibleMatchFilter.hasDnAttributes() );
     }
 
 
@@ -1881,15 +1834,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertEquals( "AMatchingRuleName", extensibleMatchFilter.getMatchingRule().toString() );
+        assertEquals( "AMatchingRuleName", extensibleMatchFilter.getMatchingRuleId() );
     }
 
 
@@ -1914,15 +1867,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof ExtensibleMatchFilter );
+        assertTrue( filter instanceof ExtensibleNode );
 
-        ExtensibleMatchFilter extensibleMatchFilter = ( ExtensibleMatchFilter ) filter;
+        ExtensibleNode extensibleMatchFilter = ( ExtensibleNode ) filter;
 
-        assertEquals( "givenName", extensibleMatchFilter.getType().toString() );
+        assertEquals( "givenName", extensibleMatchFilter.getAttribute() );
     }
 
 
@@ -1947,15 +1900,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "sn", substringFilter.getType().toString() );
+        assertEquals( "sn", substringFilter.getAttribute() );
     }
 
 
@@ -1990,15 +1943,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "jack", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "jack", substringFilter.getInitial().toString() );
     }
 
 
@@ -2023,15 +1976,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "DSMLv2.0 rocks!!", substringFilter.getInitialSubstrings().toString() );
+        assertEquals( "DSMLv2.0 rocks!!", substringFilter.getInitial().toString() );
     }
 
 
@@ -2056,15 +2009,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertNull( substringFilter.getInitialSubstrings() );
+        assertNull( substringFilter.getInitial() );
     }
 
 
@@ -2089,17 +2042,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "jack", substringFilter.getInitialSubstrings() );
+        assertEquals( "jack", substringFilter.getInitial() );
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 1, initials.size() );
 
@@ -2128,17 +2081,17 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "jack", substringFilter.getInitialSubstrings() );
+        assertEquals( "jack", substringFilter.getInitial() );
 
-        assertEquals( "john", substringFilter.getFinalSubstrings() );
+        assertEquals( "john", substringFilter.getFinal() );
     }
 
 
@@ -2163,15 +2116,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 1, initials.size() );
         assertEquals( "kate", initials.get( 0 ) );
@@ -2199,15 +2152,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 1, initials.size() );
         assertEquals( "DSMLv2.0 rocks!!", initials.get( 0 ) );
@@ -2235,15 +2188,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 0, initials.size() );
     }
@@ -2270,15 +2223,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 2, initials.size() );
 
@@ -2309,21 +2262,21 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        List<String> initials = substringFilter.getAnySubstrings();
+        List<String> initials = substringFilter.getAny();
 
         assertEquals( 1, initials.size() );
 
         assertEquals( "kate", initials.get( 0 ) );
 
-        assertEquals( "john", substringFilter.getFinalSubstrings() );
+        assertEquals( "john", substringFilter.getFinal() );
     }
 
 
@@ -2348,15 +2301,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "john", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "john", substringFilter.getFinal().toString() );
     }
 
 
@@ -2381,15 +2334,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertEquals( "DSMLv2.0 rocks!!", substringFilter.getFinalSubstrings().toString() );
+        assertEquals( "DSMLv2.0 rocks!!", substringFilter.getFinal().toString() );
     }
 
 
@@ -2414,15 +2367,15 @@ public class SearchRequestTest extends A
             fail( e.getMessage() );
         }
 
-        SearchRequestCodec searchRequest = ( SearchRequestCodec ) parser.getBatchRequest().getCurrentRequest();
+        SearchRequest searchRequest = ( SearchRequest ) parser.getBatchRequest().getCurrentRequest();
 
-        Filter filter = searchRequest.getFilter();
+        ExprNode filter = searchRequest.getFilter();
 
-        assertTrue( filter instanceof SubstringFilter );
+        assertTrue( filter instanceof SubstringNode );
 
-        SubstringFilter substringFilter = ( SubstringFilter ) filter;
+        SubstringNode substringFilter = ( SubstringNode ) filter;
 
-        assertNull( substringFilter.getFinalSubstrings() );
+        assertNull( substringFilter.getFinal() );
     }
 
 

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java
------------------------------------------------------------------------------
--- 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/searchResponse/SearchResponseTest.java:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/SearchResponseTest.java:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/SearchResponseTest.java:980350-980351

Propchange: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone/
------------------------------------------------------------------------------
--- 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/searchResponse/searchResultDone:980350-980351
+/directory/shared/branches/shared-codec-merge/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:980352-980933
 /directory/shared/branches/shared-replication/dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/searchResultDone:749791-764113
 /directory/shared/branches/shared-schema/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:806622-896441
 /directory/shared/branches/shared-subtree/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:965208-965686
 /directory/shared/branches/xdbm-refactoring/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:945830-946347
-/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:980025-980349
+/directory/shared/branches-dnfactory-experiment/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/searchResponse/searchResultDone:980350-980351



Mime
View raw message