Author: andrews
Date: 2006-08-03 09:04:33 -0400 (Thu, 03 Aug 2006)
New Revision: 63288

Added:
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs
Modified:
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControl.cs
   
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControlCollection.cs
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseInvoker.cs
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseRequest.cs
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PostableRequest.cs
   
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
   trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/nunitweb.ndoc
Log:
Ability to run tests on real web server; documentation corrections.

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControl.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControl.cs   
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControl.cs   
2006-08-03 13:04:33 UTC (rev 63288)
@@ -10,7 +10,7 @@
        public class BaseControl
        {
                /// <summary>
-               /// Default constructor. Does nothing.
+               /// Default constructor; does nothing.
                /// </summary>
                public BaseControl ()
                {
@@ -51,9 +51,9 @@
                        set { _value = value; }
                }
 
-               /// <summary>
-               /// Returns true, if the control is valid for submission. 
Override
-               /// to implement different controls validation. See
+               /// <summary>
+               /// Returns <c>true</c>, if the control is valid for 
submission. Override this method 
+               /// to implement validation of different controls. See
                /// <see 
href="http://www.w3.org/TR/REC-html40/interact/forms.html#successful-controls"/>
                /// </summary>
                public virtual bool IsSuccessful () 

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControlCollection.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControlCollection.cs
 2006-08-03 12:42:30 UTC (rev 63287)
+++ 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseControlCollection.cs
 2006-08-03 13:04:33 UTC (rev 63288)
@@ -14,7 +14,7 @@
        public sealed class BaseControlCollection : NameObjectCollectionBase 
        {
                /// <summary>
-               /// The default constructor. Does nothing.
+               /// The default constructor; does nothing.
                /// </summary>
                public BaseControlCollection ()
                {
@@ -22,10 +22,10 @@
 
                /// <summary>
                /// The constructor is necessary because this class overrides
-               /// <see 
cref="System.Collections.Specialized.NameObjectCollectionBase"/>
+               /// <see 
cref="System.Collections.Specialized.NameObjectCollectionBase"/>,
                /// which makes a custom serialization.
                /// </summary>
-               /// <param name="info">Serialization info.</param>
+               /// <param name="info">Serialization information.</param>
                /// <param name="context">Serialization context.</param>
                /// <seealso 
cref="System.Collections.Specialized.NameObjectCollectionBase"/>
                public BaseControlCollection (SerializationInfo info, 
StreamingContext context)
@@ -34,8 +34,8 @@
                }
 
                /// <summary>
-               /// Sets or gets the control with the given name. Get is 
guaranteed
-               /// to return not null value
+               /// Sets or gets the control with the given name. The 
<c>get</c> ??? is guaranteed
+               /// to return a non-null value.
                /// </summary>
                public BaseControl this [string name]
                {
@@ -44,7 +44,7 @@
                }
 
                /// <summary>
-               /// Remove a control from the collection.
+               /// Removes a control from the collection.
                /// </summary>
                /// <param name="name">The name of the control to 
remove.</param>
                public void Remove (string name)
@@ -53,7 +53,7 @@
                }
 
                /// <summary>
-               /// Add a new control to the collection. If there is control 
with
+               /// Adds a new control to the collection. If there is a control 
with
                /// the same name, it will be kept intact.
                /// </summary>
                /// <param name="name">The name of a control to be 
added.</param>
@@ -68,7 +68,7 @@
                }
 
                /// <summary>
-               /// Add a new control to the collection. If there is control 
with
+               /// Adds a new control to the collection. If there is control 
with
                /// the same name, it will be overwritten.
                /// </summary>
                /// <param name="control">New control.</param>

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseInvoker.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseInvoker.cs   
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseInvoker.cs   
2006-08-03 13:04:33 UTC (rev 63288)
@@ -3,10 +3,10 @@
 namespace MonoTests.SystemWeb.Framework
 {
        /// <summary>
-       /// Base class for invokers. Can be used on its own when no user 
callbacks need
-       /// to be executed in the web context. When a user callback need to be 
called, use
-       /// one of <see cref="BaseInvoker"/> subclasses, the most common is
-       /// <see cref="PageInvoker"/>.
+       /// Base class for invokers, which can be used on its own when no user 
callbacks need
+       /// to be executed in the Web context. When a user callback needs to be 
called, use
+       /// one of the <see cref="BaseInvoker"/> subclasses (the most common is
+       /// <see cref="PageInvoker"/>).
        /// </summary>
        /// <seealso cref="PageInvoker"/>
        [Serializable]
@@ -15,8 +15,8 @@
                bool _invokeDone = false;
                /// <summary>
                /// This method is called to activate the invoker. When <see 
cref="BaseInvoker"/>
-               /// is overriden, the subclasses should call the base class 
DoInvoke, if they want
-               /// to use the default CheckInvokeDone implementation.
+               /// is overriden, the subclasses should call the base class 
<c>DoInvoke</c>, if they want
+               /// to use the default <see cref="CheckInvokeDone"/> 
implementation.
                /// </summary>
                /// <param name="parameters"></param>
                public virtual void DoInvoke (params object [] parameters)
@@ -35,8 +35,8 @@
                }
 
                /// <summary>
-               /// Check, if DoInvoke was called or not. If subclasses do not 
override this
-               /// method, they have to call to <see 
cref="BaseInvoker.DoInvoke"/> to register the
+               /// Checks whether <c>DoInvoke</c> was called or not. If 
subclasses do not override this
+               /// method, they have to call <see 
cref="BaseInvoker.DoInvoke"/> to register the
                /// invocation.
                /// </summary>
                /// <seealso cref="BaseInvoker.DoInvoke"/>

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseRequest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseRequest.cs   
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/BaseRequest.cs   
2006-08-03 13:04:33 UTC (rev 63288)
@@ -2,6 +2,8 @@
 using System.IO;
 using System.Web;
 using System.Collections;
+using System.Net;
+using System.Collections.Specialized;
 
 namespace MonoTests.SystemWeb.Framework
 {
@@ -77,6 +79,23 @@
                        return br;
                }
 
+               public virtual WebRequest CreateWebRequest (Uri baseUri, 
NameValueCollection headers)
+               {
+                       return CreateHttpWebRequest (baseUri, headers);
+               }
+
+               protected virtual HttpWebRequest CreateHttpWebRequest (Uri 
baseUri, NameValueCollection headers)
+               {
+                       string reqUrl = Url;
+                       if (QueryString != null && QueryString != string.Empty)
+                               reqUrl += "?" + QueryString;
+                       Uri uri = new Uri (baseUri, Url);
+                       HttpWebRequest wr = (HttpWebRequest) WebRequest.Create 
(uri);
+                       wr.UserAgent = UserAgent;
+                       wr.Headers.Add (headers);
+                       return wr;
+               }
+
                /// <summary>
                /// This function is used by subclasses of <see 
cref="BaseRequest"/> to create a
                /// subclass of <see cref="BaseWorkerRequest"/>.
@@ -121,6 +140,17 @@
                        Response r = new Response ();
                        r.Body = wr.ToString ();
                        return r;
-               }
+               }
+
+               public virtual Response ExtractResponse (WebResponse response)
+               {
+                       Response r = new Response ();
+                       byte [] b = new byte [response.ContentLength];
+                       using (Stream s = response.GetResponseStream ()) {
+                               StreamReader sr = new StreamReader(s);
+                               r.Body = sr.ReadToEnd ();
+                       }
+                       return r;
+               }
        }
 }

Added: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs    
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs    
2006-08-03 13:04:33 UTC (rev 63288)
@@ -0,0 +1,141 @@
+using System;
+using System.Text;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Net;
+using System.IO;
+using System.Configuration;
+using System.Web.Configuration;
+using System.Collections;
+using System.Runtime.Remoting.Messaging;
+using System.Reflection;
+using System.Threading;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters.Binary;
+using System.Runtime.Serialization.Formatters.Soap;
+using System.Collections.Specialized;
+
+namespace MonoTests.SystemWeb.Framework
+{
+       internal class MyHost : MarshalByRefObject
+       {
+               public const string INVOKER_HEADER = "NunitWebInvoker";
+               public const string USER_HEADER = "NunitWebUserData";
+               public const string EXCEPTION_HEADER = "NunitWebException";
+               private const string CURRENT_WEBTEST = "NunitWebCurrentTest";
+               public AppDomain AppDomain
+               { get { return AppDomain.CurrentDomain; } }
+               
+               public static string Serialize (object o)
+               {
+                       if (o == null)
+                               return string.Empty;
+                       using (MemoryStream ms = new MemoryStream ()) {
+                               SoapFormatter f = new SoapFormatter ();
+                               f.Serialize (ms, o);
+                               return HttpUtility.UrlEncode (ms.ToArray());
+                       }
+               }
+
+               public static object Deserialize (string s)
+               {
+                       if (s == null || s == string.Empty)
+                               return null;
+                       using (MemoryStream ms = new MemoryStream ()) {
+                               byte [] ba = HttpUtility.UrlDecodeToBytes (s);
+                               ms.Write (ba, 0, ba.Length);
+                               ms.Position = 0;
+                               SoapFormatter b = new SoapFormatter ();
+                               try {
+                                       return b.Deserialize (ms);
+                               }
+                               catch (Exception e) {
+                                       throw;
+                               }
+                       }
+               }
+
+               public WebTest Run (WebTest t)
+               {
+                       NameValueCollection headers = new NameValueCollection 
();
+                       headers.Add (INVOKER_HEADER, Serialize (t.Invoker));
+                       headers.Add (USER_HEADER, Serialize (t.UserData));
+                       WebRequest wr = t.Request.CreateWebRequest (
+#if TARGET_JVM
+                               new Uri ("http://localhost:8080/NunitWebTest/";),
+#else
+new Uri ("http://localhost:59598/NunitWebTest/";),
+#endif
+                               headers);
+
+
+                       WebResponse response = null;
+                       try {
+                               response = wr.GetResponse ();
+
+                               Exception e = (Exception) Deserialize (
+                                       response.Headers[EXCEPTION_HEADER]);
+                               if (e != null)
+                                       RethrowException (e);
+
+                               t.UserData = Deserialize 
(response.Headers[USER_HEADER]);
+                               t.Response = t.Request.ExtractResponse 
(response);
+                       }
+                       catch (WebException we) {
+                               throw;//place for a breakpoint
+                       }
+                       finally {
+                               if (response != null)
+                                       response.Close ();
+                       }
+
+                       return t;
+               }
+
+               public void SendHeaders (WebTest t)
+               {
+                       HttpContext.Current.Response.AppendHeader (USER_HEADER, 
Serialize(t.UserData));
+               }
+
+               private static void RethrowException (Exception inner)
+               {
+                       Exception outer;
+                       try { //Try create a similar exception and keep the 
inner intact
+                               outer = (Exception) Activator.CreateInstance 
(inner.GetType (),
+                                       new object []{inner.ToString (), 
inner});
+                       }
+                       catch { //Failed to create a similar, fallback to the 
inner, ruining the call stack
+                               throw inner;
+                       }
+                       throw outer;
+               }
+
+               public static WebTest GetCurrentTest ()
+               {
+                       WebTest wt = HttpContext.Current.Items[CURRENT_WEBTEST] 
as WebTest;
+                       if (wt != null)
+                               return wt;
+                       wt = new WebTest ();
+                       wt.Invoker = (BaseInvoker) Deserialize (
+                               HttpContext.Current.Request.Headers 
[INVOKER_HEADER]);
+                       if (wt.Invoker == null)
+                               return null;
+                       wt.UserData = Deserialize (
+                               HttpContext.Current.Request.Headers 
[USER_HEADER]);
+                       HttpContext.Current.Items[CURRENT_WEBTEST] = wt;
+                       return wt;
+               }
+
+               public void RegisterException (Exception ex)
+               {
+                       if (ex == null)
+                               return;
+                       if (HttpContext.Current.Items[EXCEPTION_HEADER] != null)
+                               return; //register only the first exception
+                       HttpContext.Current.Response.AddHeader 
(EXCEPTION_HEADER,
+                               Serialize (ex));
+                       HttpContext.Current.Items[EXCEPTION_HEADER] = ex;
+               }
+       }
+}

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PostableRequest.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PostableRequest.cs   
    2006-08-03 12:42:30 UTC (rev 63287)
+++ 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PostableRequest.cs   
    2006-08-03 13:04:33 UTC (rev 63288)
@@ -1,5 +1,7 @@
 using System;
 using System.IO;
+using System.Net;
+using System.Collections.Specialized;
 
 namespace MonoTests.SystemWeb.Framework
 {
@@ -80,5 +82,19 @@
                        return new PostableWorkerRequest (Url, QueryString,
                                wr, UserAgent, EntityBody, ContentType);
                }
+
+               public override WebRequest CreateWebRequest(Uri baseUri, 
NameValueCollection headers) {
+                       HttpWebRequest hwr = base.CreateHttpWebRequest 
(baseUri, headers);
+                       if (EntityBody == null || !IsPost)
+                               return hwr;
+                       hwr.ContentLength = EntityBody.Length;
+                       hwr.Method = "POST";
+                       hwr.ContentType = ContentType;
+                       using (Stream s = hwr.GetRequestStream ()) {
+                               s.Write (EntityBody, 0, EntityBody.Length);
+                       }
+                       return hwr;
+               }
+
        }
 }

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
===================================================================
--- 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
 2006-08-03 12:42:30 UTC (rev 63287)
+++ 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
 2006-08-03 13:04:33 UTC (rev 63288)
@@ -1,16 +1,19 @@
 using System;
-using System.Web.UI;
+using System.Web.UI;
+using MonoTests.SystemWeb.Framework;
 
 public partial class MyPage : System.Web.UI.Page
 {
        //FIXME: mono defines its own constructor here
-#if BUG_78521_FIXED
+#if BUG_78521_FIXED || !MONO_ONLY
        public MyPage ()
 #else
        protected override void OnPreInit (EventArgs e)
 #endif
        {
-               MonoTests.SystemWeb.Framework.WebTest.CurrentTest.Invoke (this);
+               WebTest t = WebTest.CurrentTest;
+               if (t != null)
+                       t.Invoke (this);
        }
                
        public override void VerifyRenderingInServerForm (Control c)

Modified: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO     
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO     
2006-08-03 13:04:33 UTC (rev 63288)
@@ -7,6 +7,11 @@
        of WebTest.CurrentTest.DoInvoke (this) call from every page
        constructor.    
 
+* get rid of CopyResource, find resources dynamically or copy all necessary
+       resources on startup.
+
+* make abstract interface unifying MyHost and WebTestHost
+
 DOCUMENTATION
 
 * add the documentation about instrumenting pages to add the test hooks

Modified: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs       
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs       
2006-08-03 13:04:33 UTC (rev 63288)
@@ -1,3 +1,7 @@
+#if TARGET_JVM_FOR_WEBTEST
+#define TARGET_JVM
+#endif
+
 using System;
 using System.Reflection;
 using System.IO;
@@ -98,15 +102,18 @@
                                host = AppDomain.CurrentDomain.GetData 
(HOST_INSTANCE_NAME) as MyHost;
                                if (host != null)
                                        return host;
-#endif
                                try {
-                                       host = new MyHost (); //Fake instance 
to make EnsureHosting happy
+                                       host = new MyHost (); //Fake instance 
to make EnsureHosting happy
                                        host = InitHosting ();
+
                                }
                                catch {
                                        host = null; //Remove the fake instance 
if CreateHosting failed
                                        throw;
-                               }
+                               }
+#else
+                               host = new MyHost ();
+#endif
                                return host;
                        }
                }
@@ -164,6 +171,11 @@
                                RegisterException (ex);
                                throw;
                        }
+               }
+
+               public void SendHeaders ()
+               {
+                       Host.SendHeaders (this);
                }
 
                /// <summary>
@@ -188,16 +200,16 @@
                /// </summary>
                public static void Unload ()
                {
+#if !TARGET_JVM
                        if (host == null)
                                return;
 
                        AppDomain oldDomain = host.AppDomain;
                        host = null;
-#if !TARGET_JVM
                        AppDomain.CurrentDomain.SetData (HOST_INSTANCE_NAME, 
null);
                        AppDomain.Unload (oldDomain);
+                       Directory.Delete (baseDir, true);
 #endif
-                       Directory.Delete (baseDir, true);
                }
 
                /// <summary>
@@ -311,6 +323,7 @@
                /// <example><code>CopyResource (GetType (), "Default.skin", 
"App_Themes/Black/Default.skin");</code></example>
                public static void CopyResource (Type type, string 
resourceName, string targetUrl)
                {
+#if !TARGET_JVM
                        EnsureHosting ();
                        EnsureDirectoryExists (Path.Combine (baseDir,
                                Path.GetDirectoryName (targetUrl)));
@@ -323,6 +336,7 @@
                                        target.Write (array, 0, array.Length);
                                }
                        }
+#endif
                }
 
                private static void EnsureHosting ()
@@ -330,12 +344,11 @@
                        MyHost h = Host;
                }
 
+#if !TARGET_JVM
+               const string VIRTUAL_BASE_DIR = "/NunitWeb";
                private static string baseDir;
                private static string binDir;
-               const string VIRTUAL_BASE_DIR = "/NunitWeb";
-#if !TARGET_JVM
                const string HOST_INSTANCE_NAME = 
"MonoTests/SysWeb/Framework/Host";
-#endif
 
                private static MyHost InitHosting ()
                {
@@ -347,7 +360,6 @@
 
                        CopyResources ();
                        File.Create (Path.Combine (baseDir, "page.fake"));
-#if !TARGET_JVM
                        foreach (Assembly ass in 
AppDomain.CurrentDomain.GetAssemblies ())
                                LoadAssemblyRecursive (ass);
 
@@ -357,14 +369,9 @@
                        MyHost host = (MyHost) 
ApplicationHost.CreateApplicationHost (typeof (MyHost), VIRTUAL_BASE_DIR, 
baseDir);
                        AppDomain.CurrentDomain.SetData (HOST_INSTANCE_NAME, 
host);
                        host.AppDomain.SetData (HOST_INSTANCE_NAME, host);
-#else
-                       host = new MyHost ();
-                       AppDomain.CurrentDomain.SetData (".appVPath", 
VIRTUAL_BASE_DIR);
-                       AppDomain.CurrentDomain.SetData (".appPath", baseDir);
-#endif
                        return host;
                }
-
+
                private static void CopyResources ()
                {
 #if VISUAL_STUDIO
@@ -383,26 +390,26 @@
                        CopyResource (typeof (WebTest),
                                
"MonoTests.SystemWeb.Framework.Resources.My.master",
                                "My.master");
-#if TARGET_JVM
-                       CopyResource (typeof (WebTest),
-                               
"MonoTests.SystemWeb.Framework.Resources.assemblies.global.asax.xml",
-                               "assemblies/global.asax.xml");
-                       CopyResource (typeof (WebTest),
-                               
"MonoTests.SystemWeb.Framework.Resources.assemblies.mypage.aspx.xml",
-                               "assemblies/mypage.aspx.xml");
-                       CopyResource (typeof (WebTest),
-                               
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.dll.ghres",
-                               "assemblies/hnnefdht/dll.ghres");
-                       CopyResource (typeof (WebTest),
-                               
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.hnnefdhtAttrib.class",
-                               "assemblies/hnnefdht/hnnefdhtAttrib.class");
-//                     CopyResource (typeof (WebTest),
-//                             
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.ASP.MyPage_aspx_MyPage_aspxAttrib.class",
-//                             
"assemblies/hnnefdht/ASP/MyPage_aspx$MyPage_aspxAttrib.class");
-//                     CopyResource (typeof (WebTest),
-//                             
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.ASP.MyPage_aspx.class",
-//                             "assemblies/hnnefdht/ASP/MyPage_aspx.class");
-#endif
+//#if TARGET_JVM
+//                        CopyResource (typeof (WebTest),
+//                                
"MonoTests.SystemWeb.Framework.Resources.assemblies.global.asax.xml",
+//                                "assemblies/global.asax.xml");
+//                        CopyResource (typeof (WebTest),
+//                                
"MonoTests.SystemWeb.Framework.Resources.assemblies.mypage.aspx.xml",
+//                                "assemblies/mypage.aspx.xml");
+//                        CopyResource (typeof (WebTest),
+//                                
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.dll.ghres",
+//                                "assemblies/hnnefdht/dll.ghres");
+//                        CopyResource (typeof (WebTest),
+//                                
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.hnnefdhtAttrib.class",
+//                                "assemblies/hnnefdht/hnnefdhtAttrib.class");
+////                   CopyResource (typeof (WebTest),
+////                           
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.ASP.MyPage_aspx_MyPage_aspxAttrib.class",
+////                           
"assemblies/hnnefdht/ASP/MyPage_aspx$MyPage_aspxAttrib.class");
+////                   CopyResource (typeof (WebTest),
+////                           
"MonoTests.SystemWeb.Framework.Resources.assemblies.hnnefdht.ASP.MyPage_aspx.class",
+////                           "assemblies/hnnefdht/ASP/MyPage_aspx.class");
+//#endif
 #else
                        CopyResource (typeof (WebTest), "Web.config", 
"Web.config");
                        CopyResource (typeof (WebTest), "MyPage.aspx", 
"MyPage.aspx");
@@ -411,5 +418,6 @@
                        CopyResource (typeof (WebTest), "My.master", 
"My.master");
 #endif
                }
+#endif
        }
 }

Modified: 
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/nunitweb.ndoc
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/nunitweb.ndoc    
2006-08-03 12:42:30 UTC (rev 63287)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/nunitweb.ndoc    
2006-08-03 13:04:33 UTC (rev 63288)
@@ -5,21 +5,25 @@
     <namespaces>
       <namespace name="MonoTests.SystemWeb.Framework">
         <para>
-          The idea of the Framework is as the following. A Web application 
root is created
+          The idea of the Framework is as follows:
+        </para>
+        <para>
+          A Web application root is created
           in a temp directory. All currently referenced and loaded assemblies 
are copied
           to the /bin folder. Starting from this point, <see 
cref="HttpRuntime.ProcessRequest()"/> is
-          able to process any requests, compiling ASPX, themes, master pages, 
etc. if
+          able to process any requests, compiling ASPX, themes, master pages, 
etc., if
           necessary.
         </para>
         <para>A few words about the API:</para>
         <para>
-          WebTest is the central class of the Framework. It's instances are 
typically
-          created in NUnit testcases. WebTest instances carry the information 
from the
-          testcase appdomain into the Web application appdomain, and back. The 
most
-          important properties of <see cref="WebTest"/> are Request and 
Invoker. The Request carries all
-          the necessary information used to create an HttpWorkerRequest in the 
Web appdomain.
+          <see cref="WebTest"/> is the central class of the Framework. Its 
instances are typically
+          created in NUnit test cases. WebTest instances carry the information 
from the
+          test case application domain into the Web application domain, and 
back. The most
+          important properties of WebTest are <see cref="Request"/> and <see 
cref="Invoker"/>.
+          The Request carries all
+          the necessary information used to create an HttpWorkerRequest in the 
Web application domain.
           The Invoker carries all the callbacks that have to be invoked to 
perform the
-          tests in the Web appdomain. Here is an example of using WebTest, 
Request,
+          tests in the Web application domain. Here is an example of using 
WebTest, Request,
           and Invoker.
         </para>
         <example>
@@ -61,8 +65,8 @@
         </example>
 
         <para>
-          This will parse the response, and use action URL, GET/POST method 
and all
-          hidden fields (VIEWSTATE, etc.) You might add more query parameters, 
like
+          This will parse the response, and use action URL, GET/POST methods 
and all
+          hidden fields (VIEWSTATE, etc.). You might add more query 
parameters, like:
         </para>
         <example>
           <code>
@@ -71,7 +75,7 @@
           </code>
         </example>
 
-        <para>3.Then run the second request:</para>
+        <para>3. Then run the second request:</para>
 
         <example>
           <code>
@@ -91,7 +95,7 @@
           </code>
         </example>
 
-        <para>the delegate for the above test might look like:</para>
+        <para>The delegate for the above test may look like:</para>
 
         <example>
           <code>

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

Reply via email to