fix the documentation
authorAndrew Skiba <andrews@mono-cvs.ximian.com>
Thu, 27 Jul 2006 12:22:53 +0000 (12:22 -0000)
committerAndrew Skiba <andrews@mono-cvs.ximian.com>
Thu, 27 Jul 2006 12:22:53 +0000 (12:22 -0000)
svn path=/trunk/mcs/; revision=63035

mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/nunitweb.ndoc

index 0f9ac58a302ed5225ee04bd7a4b0f74ce22bb1f5..2808920bdcd32fc2d22890d238e7053653aebd27 100644 (file)
         <assembly location=".\bin\Debug\NunitWeb.dll" documentation=".\bin\Debug\NunitWeb.xml" />\r
     </assemblies>\r
     <namespaces>\r
-        <namespace name="MonoTests.SystemWeb.Framework"><para>The idea of the framework is as the following. A web application root is created\r
-in a temp directory. All currently referenced and loaded assemblies are copied\r
-to the /bin folder. Starting from this point, <see cref="HttpRuntime.ProcessRequest()"/> is\r
-able to process any requests, compiling aspx, themes, master pages, etc. if\r
-necessary.\r
-</para>\r
-<para>Few words about the API.</para>\r
-<para>\r
-WebTest is the central class of the framework. It's instances are typically\r
-created in Nunit testcases. WebTest instances carry the information from the\r
-testcase appdomain into the web application appdomain, and back. The most\r
-important properties of <see cref="WebTest"/> are Request and Invoker. The request carries all\r
-the information, necessary to create an HttpWorkerRequest in the web appdomain.\r
-The invoker carries all the callbacks which have to be invoked to perform the\r
-tests in the web appdomain. Here is an example of using the WebTest, Request,\r
-and Invoker.\r
-</para>\r
-<example>\r
-<code>\r
+      <namespace name="MonoTests.SystemWeb.Framework">\r
+        <para>\r
+          The idea of the Framework is as the following. A Web application root is created\r
+          in a temp directory. All currently referenced and loaded assemblies are copied\r
+          to the /bin folder. Starting from this point, <see cref="HttpRuntime.ProcessRequest()"/> is\r
+          able to process any requests, compiling ASPX, themes, master pages, etc. if\r
+          necessary.\r
+        </para>\r
+        <para>A few words about the API:</para>\r
+        <para>\r
+          WebTest is the central class of the Framework. It's instances are typically\r
+          created in NUnit testcases. WebTest instances carry the information from the\r
+          testcase appdomain into the Web application appdomain, and back. The most\r
+          important properties of <see cref="WebTest"/> are Request and Invoker. The Request carries all\r
+          the necessary information used to create an HttpWorkerRequest in the Web appdomain.\r
+          The Invoker carries all the callbacks that have to be invoked to perform the\r
+          tests in the Web appdomain. Here is an example of using WebTest, Request,\r
+          and Invoker.\r
+        </para>\r
+        <example>\r
+          <code>\r
+            <![CDATA[\r
 [Test]\r
 public void TestCase1 ()\r
 {\r
-       WebTest t = new WebTest ();\r
-       t.Invoker = PageInvoker.CreateOnLoad (TestCase1OnLoad));\r
-       t.Request.Url = "MyPage.aspx";\r
-       string htmlRes = t.Run();\r
-       //HtmlDiff on htmlRes ...\r
+  WebTest t = new WebTest ();\r
+  t.Invoker = PageInvoker.CreateOnLoad (TestCase1OnLoad));\r
+  t.Request.Url = "MyPage.aspx";\r
+  string htmlRes = t.Run();\r
+  //HtmlDiff on htmlRes ...\r
 }\r
 \r
 static public void TestCase1OnLoad (Page p) //invoked in the web appdomain\r
 {\r
-       Assert.AreEqual ("White", p.StyleSheetTheme);\r
-}\r
-</code>\r
-</example>\r
-\r
-There is a support for postback. The flow goes like this: you make a first\r
-request like:\r
-\r
-<example>\r
-<code>\r
-WebTest t = new WebTest ("SomePage.aspx");\r
-t.Run ();\r
-</code>\r
-</example>\r
-\r
-Then you use the response to create a FormRequest:\r
-\r
-<example>\r
-<code>\r
-FormRequest f = new FormRequest (t.Response);\r
-</code>\r
-</example>\r
-\r
-This will parse the response, and use action URL, GET/POST method and all\r
-hidden fields (VIEWSTATE, etc.) You might add more query parameters, like\r
-\r
-<example>\r
-<code>\r
-f.Controls.Add (new BaseControl ("button1", ""));\r
-f.Controls.Add (new BaseControl ("textbox1", "some text");\r
-</code>\r
-</example>\r
-\r
-and run the second request:\r
-\r
-<example>\r
-<code>\r
-t.Request = f;\r
-t.Run ();\r
-</code>\r
-</example>\r
-\r
-It can be useful to install some callbacks for the second request, before\r
-calling to t.Run(), like the following:\r
-\r
-<example>\r
-<code>\r
-t.Invoker = PageInvoker.CreateOnLoad (MyDelegate);\r
-</code>\r
-</example>\r
-\r
-the delegate for the above test might look like:\r
-\r
-<example>\r
-<code>\r
+  Assert.AreEqual ("White", p.StyleSheetTheme);\r
+}]]>\r
+          </code>\r
+        </example>\r
+\r
+        <para>There is support for postback. The flow goes like this:</para>\r
+        <para>1. You make a first request like:</para>\r
+\r
+        <example>\r
+          <code>\r
+            WebTest t = new WebTest ("SomePage.aspx");\r
+            t.Run ();\r
+          </code>\r
+        </example>\r
+\r
+        <para>2. Then you use the response to create a FormRequest:</para>\r
+\r
+        <example>\r
+          <code>\r
+            FormRequest f = new FormRequest (t.Response);\r
+          </code>\r
+        </example>\r
+\r
+        <para>\r
+          This will parse the response, and use action URL, GET/POST method and all\r
+          hidden fields (VIEWSTATE, etc.) You might add more query parameters, like\r
+        </para>\r
+        <example>\r
+          <code>\r
+            f.Controls.Add (new BaseControl ("button1", ""));\r
+            f.Controls.Add (new BaseControl ("textbox1", "some text");\r
+          </code>\r
+        </example>\r
+\r
+        <para>3.Then run the second request:</para>\r
+\r
+        <example>\r
+          <code>\r
+            t.Request = f;\r
+            t.Run ();\r
+          </code>\r
+        </example>\r
+\r
+        <para>\r
+          It can be useful to install some callbacks for the second request, before\r
+          calling to t.Run(), as in the following:\r
+        </para>\r
+        \r
+        <example>\r
+          <code>\r
+            t.Invoker = PageInvoker.CreateOnLoad (MyDelegate);\r
+          </code>\r
+        </example>\r
+\r
+        <para>the delegate for the above test might look like:</para>\r
+\r
+        <example>\r
+          <code>\r
+            <![CDATA[\r
 t.Invoker = PageInvoker.CreateOnLoad (MyDelegate);\r
 \r
 static public void MyDelegate (Page p)\r
 {\r
-       Assert.IsTrue (p.IsPostBack);\r
-       Assert.AreEqual ("some text", ((TextControl)p.FindControl ("textbox1")).Text);\r
-}\r
-</code>\r
-</example>\r
+  Assert.IsTrue (p.IsPostBack);\r
+  Assert.AreEqual ("some text", ((TextControl)p.FindControl ("textbox1")).Text);\r
+}]]>\r
+          </code>\r
+        </example>\r
 \r
 \r
-</namespace>\r
+      </namespace>\r
     </namespaces>\r
     <documenters>\r
         <documenter name="JavaDoc">\r