Author: gert
Date: 2008-02-10 05:28:31 -0500 (Sun, 10 Feb 2008)
New Revision: 95365

Modified:
   trunk/gert/standalone/bug357565/test.cs
Log:
Improve test.


Modified: trunk/gert/standalone/bug357565/test.cs
===================================================================
--- trunk/gert/standalone/bug357565/test.cs     2008-02-10 10:12:31 UTC (rev 
95364)
+++ trunk/gert/standalone/bug357565/test.cs     2008-02-10 10:28:31 UTC (rev 
95365)
@@ -38,7 +38,10 @@
                        return 1;
                }
 
-               File.Create (Path.Combine (webDir, "app_offline.htm")).Close ();
+               using (StreamWriter sw = new StreamWriter (Path.Combine 
(webDir, "app_offline.htm"), false, Encoding.UTF8)) {
+                       sw.Write ("<p>Out for lunch</p>");
+               }
+
                Thread.Sleep (500);
                Assert.IsTrue (File.Exists (Path.Combine (webDir, 
"app_start")), "#B1");
                Assert.IsTrue (File.Exists (Path.Combine (webDir, "app_end")), 
"#B2");
@@ -54,6 +57,10 @@
                        Assert.AreEqual (WebExceptionStatus.ProtocolError, 
ex.Status, "#C1");
                        Assert.IsNotNull (response, "#C2");
                        Assert.AreEqual (HttpStatusCode.NotFound, 
response.StatusCode, "#C3");
+
+                       using (StreamReader sr = new StreamReader 
(response.GetResponseStream ())) {
+                               Assert.AreEqual ("<p>Out for lunch</p>", 
sr.ReadToEnd (), "#C4");
+                       }
                }
 
                File.Delete (Path.Combine (webDir, "app_start"));

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to