You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ka...@apache.org on 2011/04/13 18:10:19 UTC

svn commit: r1091842 - in /directory/apacheds/trunk/server-integ/src/test: java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java resources/dsml-search-req.xml

Author: kayyagari
Date: Wed Apr 13 16:10:19 2011
New Revision: 1091842

URL: http://svn.apache.org/viewvc?rev=1091842&view=rev
Log:
o fixed the testcase
o added license header

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java
    directory/apacheds/trunk/server-integ/src/test/resources/dsml-search-req.xml

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java?rev=1091842&r1=1091841&r2=1091842&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java (original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/dsml/engine/Dsmlv2EngineTest.java Wed Apr 13 16:10:19 2011
@@ -41,13 +41,12 @@ import org.apache.directory.shared.dsmlv
 import org.apache.directory.shared.ldap.codec.api.LdapCodecServiceFactory;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 
 /**
- * Test for demonstrating the NPE generated while processing a search DSML request by Dsmlv2Engine.
+ * Test for Dsmlv2Engine.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
@@ -78,11 +77,8 @@ public class Dsmlv2EngineTest extends Ab
     }
 
 
-    //Enable WARN level logging to see the stacktrace
-    // e.x log4j.rootCategory=WARN, stdout
-    @Ignore("Failes with an NPE at org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator.computeLength(SearchRequestDecorator.java:939)")
     @Test
-    public void testEngineWithDefaultBlockingResponse() throws Exception
+    public void testEngineWithSearchRequest() throws Exception
     {
         InputStream dsmlIn = getClass().getClassLoader().getResourceAsStream( "dsml-search-req.xml" );
 
@@ -91,7 +87,6 @@ public class Dsmlv2EngineTest extends Ab
         engine.processDSML( dsmlIn, byteOut );
 
         Dsmlv2ResponseParser respParser = new Dsmlv2ResponseParser( LdapCodecServiceFactory.getSingleton() );
-        System.out.println( byteOut.toString() );
         respParser.setInput( byteOut.toString() );
 
         respParser.parseAllResponses();

Modified: directory/apacheds/trunk/server-integ/src/test/resources/dsml-search-req.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/resources/dsml-search-req.xml?rev=1091842&r1=1091841&r2=1091842&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/resources/dsml-search-req.xml (original)
+++ directory/apacheds/trunk/server-integ/src/test/resources/dsml-search-req.xml Wed Apr 13 16:10:19 2011
@@ -1,18 +1,32 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
-	<soap-env:Body>
-		<dsml:batchRequest xmlns:dsml="urn:oasis:names:tc:DSML:2:0:core"
-			xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-			<searchRequest dn="ou=system" scope="singleLevel"
-				derefAliases="neverDerefAliases" typesOnly="false" >
-				<filter>
-					<present name="objectClass">
-					</present>
-				</filter>
-				<attributes>
-				  <attribute name="*"/>
-				</attributes>
-			</searchRequest>
-		</dsml:batchRequest>
-	</soap-env:Body>
-</soap-env:Envelope>
\ No newline at end of file
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<batchRequest xmlns="urn:oasis:names:tc:DSML:2:0:core"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<searchRequest dn="ou=system" scope="singleLevel"
+		derefAliases="neverDerefAliases" typesOnly="false" >
+		<filter>
+			<present name="objectClass">
+			</present>
+		</filter>
+		<attributes>
+		  <attribute name="*"/>
+		</attributes>
+	</searchRequest>
+</batchRequest>