Author: aroush
Date: Thu Jun 15 19:03:33 2006
New Revision: 414718

URL: http://svn.apache.org/viewvc?rev=414718&view=rev
Log:
Lucene.Net 1.9 Build 005

Modified:
    incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs
URL: 
http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/TestSearch.cs?rev=414718&r1=414717&r2=414718&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/TestSearch.cs Thu Jun 15 19:03:33 
2006
@@ -55,20 +55,20 @@
                [Test]
         public virtual void  TestSearch_Renamed_Method()
                {
-                       System.IO.StringWriter sw = new 
System.IO.StringWriter();
-                       System.IO.StreamWriter pw = null; // new 
System.IO.StreamWriter(sw);    // {{Aroush}} how do you pass 'sw' to 
StreamWriter()?
+            System.IO.MemoryStream sw = new System.IO.MemoryStream();
+            System.IO.StreamWriter pw = new System.IO.StreamWriter(sw);
                        DoTestSearch(pw, false);
                        pw.Close();
                        sw.Close();
-                       System.String multiFileOutput = 
sw.GetStringBuilder().ToString();
+                       System.String multiFileOutput = 
System.Text.ASCIIEncoding.ASCII.GetString(sw.ToArray());
                        //System.out.println(multiFileOutput);
                        
-                       sw = new System.IO.StringWriter();
-                       pw = null; // new System.IO.StreamWriter(sw);   // 
{{Aroush}} how do you pass 'sw' to StreamWriter()?
+                       sw = new System.IO.MemoryStream();
+                       pw = new System.IO.StreamWriter(sw);
                        DoTestSearch(pw, true);
                        pw.Close();
                        sw.Close();
-                       System.String singleFileOutput = 
sw.GetStringBuilder().ToString();
+                       System.String singleFileOutput = 
System.Text.ASCIIEncoding.ASCII.GetString(sw.ToArray());
                        
                        Assert.AreEqual(multiFileOutput, singleFileOutput);
                }


Reply via email to