You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2008/06/07 16:17:30 UTC

svn commit: r664342 [6/7] - in /directory/sandbox/seelmann/testingframework: ./ apacheds-configuration-help/src/main/docbook/ apacheds-configuration-help/src/main/resources/html/images/ apacheds-configuration-help/src/main/resources/html/images/getting...

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java Sat Jun  7 07:17:06 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput(
+                AuthResponseTest.class.getResource( "response_with_requestID_attribute.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -69,8 +69,8 @@
 
         assertEquals( 456, bindResponse.getMessageId() );
     }
-   
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -90,7 +90,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -111,7 +111,8 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
-    
+
+
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
@@ -122,7 +123,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -133,7 +135,7 @@
 
         BindResponse bindResponse = ( BindResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = bindResponse.getCurrentControl();
-        
+
         assertEquals( 1, bindResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -151,7 +153,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser
+                .setInput( AuthResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -184,8 +187,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -236,7 +239,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -263,7 +267,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -279,7 +284,8 @@
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with Empty Error Message
      */
@@ -290,7 +296,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput(
+                AuthResponseTest.class.getResource( "response_with_empty_error_message.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -317,7 +324,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser
+                .setInput( AuthResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -345,7 +353,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with an empty Referral
      */
@@ -356,7 +365,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -385,7 +395,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -436,8 +447,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
-                .getFile() );
+            parser.setInput( AuthResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -477,8 +488,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AuthResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
-                .getFile() );
+            parser.setInput(
+                AuthResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java Sat Jun  7 07:17:06 2008
@@ -56,8 +56,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser
-                .setInputFile( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -70,7 +70,8 @@
 
         assertEquals( 1234567890, batchRequest.getRequestID() );
     }
-    
+
+
     /**
      * Test parsing of a request with the (optional) requestID attribute equals to 0
      */
@@ -90,8 +91,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser
-                .setInputFile( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -116,7 +117,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_AuthRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AuthRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -152,7 +154,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_AddRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AddRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -188,7 +191,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_CompareRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_CompareRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -224,7 +228,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_AbandonRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AbandonRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -260,7 +265,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_DelRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_DelRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -296,7 +302,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_ExtendedRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ExtendedRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -332,7 +339,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_ModDNRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ModDNRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -368,7 +376,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_ModifyRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_ModifyRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -404,7 +413,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_SearchRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_SearchRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -440,7 +450,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_AddRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_AddRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -476,7 +487,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_CompareRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_CompareRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -512,7 +524,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_AbandonRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_AbandonRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -548,7 +561,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_DelRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_DelRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -584,7 +598,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_ExtendedRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ExtendedRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -620,7 +635,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_ModDNRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ModDNRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -656,7 +672,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_ModifyRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_ModifyRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -692,7 +709,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_2_SearchRequest.xml" ).getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_2_SearchRequest.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -728,8 +746,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( BatchRequestTest.class.getResource( "request_with_1_AuthRequest_1_AddRequest.xml" )
-                .getFile() );
+            parser.setInput( BatchRequestTest.class.getResource( "request_with_1_AuthRequest_1_AddRequest.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java Sat Jun  7 07:17:06 2008
@@ -54,8 +54,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -68,8 +68,8 @@
 
         assertEquals( 1234567890, batchResponse.getRequestID() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -89,7 +89,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_0_response.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_0_response.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -114,7 +115,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_AddResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_AddResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -150,7 +152,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_AuthResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_AuthResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -186,8 +189,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( BatchResponseTest.class.getResource( "response_with_1_CompareResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_CompareResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -223,7 +226,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_DelResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_DelResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -259,7 +263,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_ErrorResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_ErrorResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -295,8 +300,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_ExtendedResponse.xml" )
-                .getFile() );
+            parser.setInput(
+                BatchResponseTest.class.getResource( "response_with_1_ExtendedResponse.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -332,7 +337,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_ModDNResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_ModDNResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -368,7 +374,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_ModifyResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_ModifyResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -404,7 +411,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_1_SearchResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_1_SearchResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -440,7 +448,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_AddResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_AddResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -476,7 +485,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_AuthResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_AuthResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -512,8 +522,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( BatchResponseTest.class.getResource( "response_with_2_CompareResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_CompareResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -549,7 +559,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_DelResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_DelResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -585,7 +596,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_ErrorResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_ErrorResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -621,8 +633,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_ExtendedResponse.xml" )
-                .getFile() );
+            parser.setInput(
+                BatchResponseTest.class.getResource( "response_with_2_ExtendedResponse.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -658,7 +670,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_ModDNResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_ModDNResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -694,7 +707,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_ModifyResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_ModifyResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -730,7 +744,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( BatchResponseTest.class.getResource( "response_with_2_SearchResponse.xml" ).getFile() );
+            parser.setInput( BatchResponseTest.class.getResource( "response_with_2_SearchResponse.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java Sat Jun  7 07:17:06 2008
@@ -55,7 +55,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_dn_attribute.xml" ).getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -80,8 +81,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -115,7 +116,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser
+                .setInput( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -148,7 +150,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser
+                .setInput( CompareRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -181,8 +184,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -215,7 +218,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -248,8 +252,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -282,8 +286,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_complete_assertion.xml" )
-                .getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_1_complete_assertion.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -312,8 +316,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource(
-                "request_with_1_complete_assertion_base64_value.xml" ).getFile() );
+            parser.setInput( CompareRequestTest.class
+                .getResource( "request_with_1_complete_assertion_base64_value.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -342,8 +346,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( CompareRequestTest.class.getResource( "request_with_1_assertion_empty_value.xml" )
-                .getFile() );
+            parser.setInput( CompareRequestTest.class.getResource( "request_with_1_assertion_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java Sat Jun  7 07:17:06 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -69,8 +69,8 @@
 
         assertEquals( 456, compareResponse.getMessageId() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -90,7 +90,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -111,7 +112,8 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
-    
+
+
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
@@ -122,7 +124,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -133,7 +136,7 @@
 
         CompareResponse compareResponse = ( CompareResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = compareResponse.getCurrentControl();
-        
+
         assertEquals( 1, compareResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -151,7 +154,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -184,8 +188,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -236,7 +240,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -263,7 +268,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -279,7 +285,8 @@
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Error Message
      */
@@ -290,7 +297,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_empty_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -317,7 +325,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -345,7 +354,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with an empty Referral
      */
@@ -356,7 +366,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput(
+                CompareResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -385,7 +396,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -436,8 +448,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource(
-                "response_with_1_referral_and_error_message.xml" ).getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -477,8 +489,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( CompareResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
-                .getFile() );
+            parser.setInput( CompareResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java Sat Jun  7 07:17:06 2008
@@ -55,7 +55,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_dn_attribute.xml" ).getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -80,7 +80,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -114,7 +115,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -143,8 +144,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput(
+                DelRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -173,8 +174,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser
-                .setInputFile( DelRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -203,7 +204,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -232,8 +233,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( DelRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( DelRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java Sat Jun  7 07:17:06 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( DelResponseTest.class.getResource( "response_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -69,8 +69,8 @@
 
         assertEquals( 456, delResponse.getMessageId() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -90,7 +90,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -112,6 +112,7 @@
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
+
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
@@ -122,7 +123,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -133,14 +135,14 @@
 
         DelResponse delResponse = ( DelResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = delResponse.getCurrentControl();
-        
+
         assertEquals( 1, delResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
         assertEquals( StringTools.EMPTY_BYTES, ( byte[] ) control.getControlValue() );
     }
 
-    
+
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
@@ -151,7 +153,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -184,8 +186,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -236,7 +238,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser
+                .setInput( DelResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -263,7 +266,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -279,7 +283,8 @@
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Error Message
      */
@@ -290,7 +295,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_empty_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -317,7 +323,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -345,7 +351,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with an empty Referral
      */
@@ -356,7 +363,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -385,7 +393,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser
+                .setInput( DelResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -436,8 +445,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( DelResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
-                .getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -477,8 +486,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( DelResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).getFile() );
+            parser.setInput( DelResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java Sat Jun  7 07:17:06 2008
@@ -46,8 +46,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -60,8 +60,8 @@
 
         assertEquals( 456, errorResponse.getMessageId() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -90,8 +90,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( ErrorResponseTest.class.getResource( "response_with_type_notAttempted.xml" ).getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_notAttempted.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -116,8 +116,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_couldNotConnect.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_couldNotConnect.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -142,8 +142,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_connectionClosed.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_connectionClosed.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -168,8 +168,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_malformedRequest.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_malformedRequest.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -194,8 +194,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_gatewayInternalError.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_gatewayInternalError.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -220,8 +220,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_authenticationFailed.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_authenticationFailed.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -246,8 +246,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_unresolvableURI.xml" )
-                .getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_unresolvableURI.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -272,7 +272,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_type_other.xml" ).getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_type_other.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -306,7 +307,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_message.xml" ).getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_message.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -319,7 +320,8 @@
 
         assertEquals( "Connection refused", errorResponse.getMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Message
      */
@@ -330,7 +332,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ErrorResponseTest.class.getResource( "response_with_empty_message.xml" ).getFile() );
+            parser.setInput( ErrorResponseTest.class.getResource( "response_with_empty_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java Sat Jun  7 07:17:06 2008
@@ -46,8 +46,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -81,7 +81,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -110,8 +111,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -140,8 +141,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -170,7 +171,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -199,8 +201,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -229,7 +231,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_requestValue.xml" ).getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_requestValue.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -254,8 +257,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_base64_requestValue.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_base64_requestValue.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -307,8 +310,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ExtendedRequestTest.class.getResource( "request_with_empty_requestValue.xml" )
-                .getFile() );
+            parser.setInput( ExtendedRequestTest.class.getResource( "request_with_empty_requestValue.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse/ExtendedResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse/ExtendedResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse/ExtendedResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse/ExtendedResponseTest.java Sat Jun  7 07:17:06 2008
@@ -57,8 +57,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -71,8 +71,8 @@
 
         assertEquals( 456, extendedResponse.getMessageId() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -92,7 +92,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -113,7 +114,8 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
-    
+
+
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
@@ -124,7 +126,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -135,7 +138,7 @@
 
         ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = extendedResponse.getCurrentControl();
-        
+
         assertEquals( 1, extendedResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -153,7 +156,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -186,8 +190,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -238,7 +242,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -265,7 +270,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -281,7 +287,8 @@
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Error Message
      */
@@ -292,7 +299,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_empty_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -319,7 +327,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -347,7 +356,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with a empty Referral
      */
@@ -358,7 +368,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_1_empty_referral.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -387,7 +398,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -438,8 +450,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource(
-                "response_with_1_referral_and_error_message.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -479,8 +491,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
-                .getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -516,7 +528,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_responseName.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_responseName.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -536,7 +549,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with empty Response Name
      */
@@ -547,7 +561,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_empty_responseName.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_empty_responseName.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -581,7 +596,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_response.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_response.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -594,7 +610,8 @@
 
         assertEquals( "This is a response", extendedResponse.getResponse() );
     }
-    
+
+
     /**
      * Test parsing of a response with Base64 Response
      */
@@ -605,7 +622,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_base64_response.xml" ).getFile() );
+            parser.setInput(
+                ExtendedResponseTest.class.getResource( "response_with_base64_response.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -616,9 +634,10 @@
 
         ExtendedResponse extendedResponse = ( ExtendedResponse ) parser.getBatchResponse().getCurrentResponse();
 
-        assertEquals( "DSMLv2.0 rocks!!", new String( (byte[]) extendedResponse.getResponse() ) );
+        assertEquals( "DSMLv2.0 rocks!!", new String( ( byte[] ) extendedResponse.getResponse() ) );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Response
      */
@@ -629,7 +648,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_empty_response.xml" ).getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_empty_response.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -654,8 +674,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ExtendedResponseTest.class.getResource( "response_with_responseName_and_response.xml" )
-                .getFile() );
+            parser.setInput( ExtendedResponseTest.class.getResource( "response_with_responseName_and_response.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest/ModifyDNRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest/ModifyDNRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest/ModifyDNRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest/ModifyDNRequestTest.java Sat Jun  7 07:17:06 2008
@@ -46,8 +46,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -81,7 +81,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -110,8 +111,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -140,8 +141,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -170,7 +171,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -199,8 +201,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -247,8 +249,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_dn_and_newrdn_attributes.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_dn_and_newrdn_attributes.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -275,8 +277,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_true.xml" )
-                .getFile() );
+            parser.setInput(
+                ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_true.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -301,7 +303,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_1.xml" ).getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_1.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -326,8 +329,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_false.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_false.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -352,7 +355,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_0.xml" ).getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_deleteoldrdn_0.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -386,8 +390,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyDNRequestTest.class.getResource( "request_with_newSuperior_attribute.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_newSuperior_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse/ModifyDNResponseTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse/ModifyDNResponseTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse/ModifyDNResponseTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse/ModifyDNResponseTest.java Sat Jun  7 07:17:06 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -69,8 +69,8 @@
 
         assertEquals( 456, modifyDNResponse.getMessageId() );
     }
-    
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -90,7 +90,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -111,7 +112,8 @@
 
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
-    
+
+
     /**
      * Test parsing of a response with a (optional) Control element with empty value
      */
@@ -122,7 +124,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -133,7 +136,7 @@
 
         ModifyDNResponse modifyDNResponse = ( ModifyDNResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = modifyDNResponse.getCurrentControl();
-        
+
         assertEquals( 1, modifyDNResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -151,7 +154,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -184,8 +188,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -236,7 +240,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -263,7 +268,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -279,7 +285,8 @@
         assertEquals( "Unrecognized extended operation EXTENSION_OID: 1.2.6.1.4.1.18060.1.1.1.100.2", ldapResult
             .getErrorMessage() );
     }
-    
+
+
     /**
      * Test parsing of a response with empty Error Message
      */
@@ -290,7 +297,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_empty_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -317,7 +325,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -345,7 +354,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with an empty Referral
      */
@@ -356,7 +366,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_1_empty_referral.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -385,7 +396,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -436,8 +448,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource(
-                "response_with_1_referral_and_error_message.xml" ).getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -477,8 +489,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( ModifyDNResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
-                .getFile() );
+            parser.setInput( ModifyDNResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest/ModifyRequestTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest/ModifyRequestTest.java?rev=664342&r1=664341&r2=664342&view=diff
==============================================================================
--- directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest/ModifyRequestTest.java (original)
+++ directory/sandbox/seelmann/testingframework/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest/ModifyRequestTest.java Sat Jun  7 07:17:06 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput(
+                ModifyRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -90,7 +90,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -119,8 +119,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -149,8 +149,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -179,7 +179,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser
+                .setInput( ModifyRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -208,8 +209,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -248,7 +249,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_modification.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_modification.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -287,8 +289,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_1_modification_base64_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_1_modification_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -331,7 +333,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_2_modifications.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_2_modifications.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -387,7 +390,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_operation_add.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_add.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -413,7 +417,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_operation_delete.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_delete.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -439,7 +444,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_operation_replace.xml" ).getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_operation_replace.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -474,8 +480,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_modification_without_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -511,8 +517,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_modification_with_2_values.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_with_2_values.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -552,8 +558,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( ModifyRequestTest.class.getResource( "request_with_modification_with_empty_value.xml" )
-                .getFile() );
+            parser.setInput( ModifyRequestTest.class.getResource( "request_with_modification_with_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }