directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r650166 [1/2] - in /directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2: ./ abandonRequest/ addRequest/ addResponse/ authRequest/ authResponse/ batchRequest/ batchResponse/ compareRequest/ compareRespo...
Date Mon, 21 Apr 2008 15:06:59 GMT
Author: pamarcelot
Date: Mon Apr 21 08:06:54 2008
New Revision: 650166

URL: http://svn.apache.org/viewvc?rev=650166&view=rev
Log:
Updated tests. The tests were failing if the path of the test files were using special characters (accents or spaces).

Modified:
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/abandonRequest/AbandonRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addRequest/AddRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addResponse/AddResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authRequest/AuthRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedResponse/ExtendedResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNRequest/ModifyDNRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modDNResponse/ModifyDNResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyRequest/ModifyRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/modifyResponse/ModifyResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchRequest/SearchRequestTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/SearchResponseTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/searchResultDone/SearchResultDoneTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/searchResultEntry/SearchResultEntryTest.java
    directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/searchResponse/searchResultReference/SearchResultReferenceTest.java

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractResponseTest.java Mon Apr 21 08:06:54 2008
@@ -49,7 +49,7 @@
         {
             Dsmlv2ResponseParser parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( testClass.getResource( filename ).getFile() );
+            parser.setInput( testClass.getResource( filename ).openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/AbstractTest.java Mon Apr 21 08:06:54 2008
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.dsmlv2;
 
 
+import java.io.FileInputStream;
+
 import junit.framework.TestCase;
 
 import org.apache.directory.studio.dsmlv2.Dsmlv2Parser;
@@ -49,7 +51,7 @@
         {
             Dsmlv2Parser parser = new Dsmlv2Parser();
 
-            parser.setInputFile( testClass.getResource( filename ).getFile() );
+            parser.setInput( testClass.getResource( filename ).openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/abandonRequest/AbandonRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/abandonRequest/AbandonRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/abandonRequest/AbandonRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/abandonRequest/AbandonRequestTest.java Mon Apr 21 08:06:54 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_abandonID_attribute.xml" )
-                .getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_abandonID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -76,9 +76,10 @@
      */
     public void testRequestWithRequestIdEquals0()
     {
-    	testParsingFail( AbandonRequestTest.class, "request_with_requestID_equals_0.xml" );
+        testParsingFail( AbandonRequestTest.class, "request_with_requestID_equals_0.xml" );
     }
-    
+
+
     /**
      * Test parsing of a request with the (optional) requestID attribute
      */
@@ -89,8 +90,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
-                .getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_requestID_attribute.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -116,7 +117,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser
+                .setInput( AbandonRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -127,13 +129,14 @@
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = abandonRequest.getCurrentControl();
-        
+
         assertEquals( 1, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
-    
+
+
     /**
      * Test parsing of a request with a (optional) Control element with Base64 value
      */
@@ -145,7 +148,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -156,7 +160,7 @@
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = abandonRequest.getCurrentControl();
-        
+
         assertEquals( 1, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -175,8 +179,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -187,7 +191,7 @@
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = abandonRequest.getCurrentControl();
-        
+
         assertEquals( 1, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
@@ -206,7 +210,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -217,7 +222,7 @@
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = abandonRequest.getCurrentControl();
-        
+
         assertEquals( 2, abandonRequest.getControls().size() );
         assertFalse( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.789", control.getControlType() );
@@ -236,8 +241,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AbandonRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( AbandonRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -248,14 +253,14 @@
 
         AbandonRequest abandonRequest = ( AbandonRequest ) parser.getBatchRequest().getCurrentRequest();
         Control control = abandonRequest.getCurrentControl();
-        
+
         assertEquals( 3, abandonRequest.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.456", control.getControlType() );
         assertEquals( StringTools.EMPTY_BYTES, control.getControlValue() );
     }
-    
-    
+
+
     /**
      * Test parsing of a request with a needed requestID attribute
      * 

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addRequest/AddRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addRequest/AddRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addRequest/AddRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addRequest/AddRequestTest.java Mon Apr 21 08:06:54 2008
@@ -60,7 +60,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_dn_attribute.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_dn_attribute.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -85,7 +85,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -119,7 +120,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -152,8 +153,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput(
+                AddRequestTest.class.getResource( "request_with_1_control_base64_value.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -182,8 +183,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser
-                .setInputFile( AddRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -212,7 +213,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -241,8 +242,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -271,7 +272,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_attr_without_value.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_without_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -326,7 +328,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_attr_empty_value.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_empty_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -381,7 +384,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_attr_with_value.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -446,8 +450,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_attr_with_base64_value.xml" )
-                .getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -512,7 +516,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_2_attr_with_value.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_2_attr_with_value.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -597,7 +602,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AddRequestTest.class.getResource( "request_with_1_attr_with_2_values.xml" ).getFile() );
+            parser.setInput( AddRequestTest.class.getResource( "request_with_1_attr_with_2_values.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addResponse/AddResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addResponse/AddResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addResponse/AddResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/addResponse/AddResponseTest.java Mon Apr 21 08:06:54 2008
@@ -55,8 +55,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( AddResponseTest.class.getResource( "response_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -69,7 +69,8 @@
 
         assertEquals( 456, addResponse.getMessageId() );
     }
-    
+
+
     /**
      * Test parsing of a Response with the (optional) requestID attribute equals 0
      */
@@ -89,7 +90,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_1_control.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -111,6 +112,7 @@
         assertEquals( "Some text", StringTools.utf8ToString( ( byte[] ) control.getControlValue() ) );
     }
 
+
     /**
      * Test parsing of a response with a (optional) Control element with emptyValue
      */
@@ -121,7 +123,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_1_control_empty_value.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_1_control_empty_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -132,13 +135,14 @@
 
         AddResponse addResponse = ( AddResponse ) parser.getBatchResponse().getCurrentResponse();
         Control control = addResponse.getCurrentControl();
-        
+
         assertEquals( 1, addResponse.getControls().size() );
         assertTrue( control.getCriticality() );
         assertEquals( "1.2.840.113556.1.4.643", control.getControlType() );
-        assertEquals( StringTools.EMPTY_BYTES,  ( byte[] ) control.getControlValue() );
+        assertEquals( StringTools.EMPTY_BYTES, ( byte[] ) control.getControlValue() );
     }
 
+
     /**
      * Test parsing of a response with 2 (optional) Control elements
      */
@@ -149,7 +153,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_2_controls.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -182,8 +186,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -234,7 +238,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_result_code.xml" ).getFile() );
+            parser
+                .setInput( AddResponseTest.class.getResource( "response_with_result_code.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -261,7 +266,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_error_message.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -277,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
      */
@@ -288,7 +295,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_empty_error_message.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_empty_error_message.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -315,7 +323,7 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_1_referral.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_1_referral.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -343,7 +351,8 @@
             fail();
         }
     }
-    
+
+
     /**
      * Test parsing of a response with an empty Referral
      */
@@ -354,7 +363,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_1_empty_referral.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -383,7 +393,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_2_referrals.xml" ).getFile() );
+            parser
+                .setInput( AddResponseTest.class.getResource( "response_with_2_referrals.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -434,8 +445,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser.setInputFile( AddResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
-                .getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_1_referral_and_error_message.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -475,8 +486,8 @@
         {
             parser = new Dsmlv2ResponseParser();
 
-            parser
-                .setInputFile( AddResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).getFile() );
+            parser.setInput( AddResponseTest.class.getResource( "response_with_matchedDN_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authRequest/AuthRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authRequest/AuthRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authRequest/AuthRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authRequest/AuthRequestTest.java Mon Apr 21 08:06:54 2008
@@ -55,7 +55,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_principal_attribute.xml" ).getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_principal_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -80,7 +81,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_requestID_attribute.xml" ).openStream(),
+                "UTF-8" );
 
             parser.parse();
         }
@@ -114,7 +116,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_1_control.xml" ).getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_1_control.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -143,8 +145,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
-                .getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_1_control_base64_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -173,8 +175,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_1_control_empty_value.xml" )
-                .getFile() );
+            parser.setInput(
+                AuthRequestTest.class.getResource( "request_with_1_control_empty_value.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -203,7 +205,7 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_2_controls.xml" ).getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_2_controls.xml" ).openStream(), "UTF-8" );
 
             parser.parse();
         }
@@ -232,8 +234,8 @@
         {
             parser = new Dsmlv2Parser();
 
-            parser.setInputFile( AuthRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
-                .getFile() );
+            parser.setInput( AuthRequestTest.class.getResource( "request_with_3_controls_without_value.xml" )
+                .openStream(), "UTF-8" );
 
             parser.parse();
         }

Modified: directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/authResponse/AuthResponseTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchRequest/BatchRequestTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/batchResponse/BatchResponseTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareRequest/CompareRequestTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/compareResponse/CompareResponseTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delRequest/DelRequestTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/delResponse/DelResponseTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/errorResponse/ErrorResponseTest.java Mon Apr 21 08:06:54 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/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java?rev=650166&r1=650165&r2=650166&view=diff
==============================================================================
--- directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java (original)
+++ directory/studio/trunk/studio-dsml-parser/src/test/java/org/apache/directory/studio/dsmlv2/extendedRequest/ExtendedRequestTest.java Mon Apr 21 08:06:54 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();
         }



Mime
View raw message