directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1064389 - in /directory/shared/trunk/dsml-parser/src: main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
Date Fri, 28 Jan 2011 00:43:07 GMT
Author: elecharny
Date: Fri Jan 28 00:43:07 2011
New Revision: 1064389

URL: http://svn.apache.org/viewvc?rev=1064389&view=rev
Log:
Made AbandonRequest tests working

Modified:
    directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
    directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java?rev=1064389&r1=1064388&r2=1064389&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
(original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/Dsmlv2Grammar.java
Fri Jan 28 00:43:07 2011
@@ -43,6 +43,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.controls.ControlDecorator;
 import org.apache.directory.shared.ldap.codec.controls.ControlImpl;
+import org.apache.directory.shared.ldap.codec.decorators.AbandonRequestDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.AddRequestDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.ModifyRequestDecorator;
@@ -61,7 +62,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.exception.LdapException;
 import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.model.filter.SearchScope;
-import org.apache.directory.shared.ldap.model.message.AbandonRequest;
 import org.apache.directory.shared.ldap.model.message.AbandonRequestImpl;
 import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
@@ -1146,7 +1146,7 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            AbandonRequest abandonRequest = new AbandonRequestImpl();
+            AbandonRequestDecorator abandonRequest = new AbandonRequestDecorator( new AbandonRequestImpl()
);
             container.getBatchRequest().addRequest( abandonRequest );
 
             XmlPullParser xpp = container.getParser();
@@ -1193,8 +1193,8 @@ public final class Dsmlv2Grammar extends
     {
         public void action( Dsmlv2Container container ) throws XmlPullParserException
         {
-            AddRequestDecorator addRequestDecorator = new AddRequestDecorator( new AddRequestImpl()
);
-            container.getBatchRequest().addRequest( addRequestDecorator );
+            AddRequestDecorator addRequest = new AddRequestDecorator( new AddRequestImpl()
);
+            container.getBatchRequest().addRequest( addRequest );
 
             XmlPullParser xpp = container.getParser();
 
@@ -1204,7 +1204,7 @@ public final class Dsmlv2Grammar extends
             attributeValue = xpp.getAttributeValue( "", "requestID" );
             if ( attributeValue != null )
             {
-                addRequestDecorator.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue,
xpp ) );
+                addRequest.setMessageId( ParserUtils.parseAndVerifyRequestID( attributeValue,
xpp ) );
             }
             else
             {
@@ -1219,7 +1219,7 @@ public final class Dsmlv2Grammar extends
             {
                 try
                 {
-                    addRequestDecorator.setEntryDn( new Dn( attributeValue ) );
+                    addRequest.setEntryDn( new Dn( attributeValue ) );
                 }
                 catch ( LdapInvalidDnException e )
                 {

Modified: directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java?rev=1064389&r1=1064388&r2=1064389&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
(original)
+++ directory/shared/trunk/dsml-parser/src/test/java/org/apache/directory/shared/dsmlv2/addRequest/AddRequestTest.java
Fri Jan 28 00:43:07 2011
@@ -143,7 +143,6 @@ public class AddRequestTest extends Abst
         }
         catch ( Exception e )
         {
-            e.printStackTrace();
             fail( e.getMessage() );
         }
 



Mime
View raw message