* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / System.Web / Test / mainsoft / MainsoftWebApp / System_Web_SessionState / HttpSessionState / HttpSessionState_Item_I.aspx.cs
1 //
2 // Authors:
3 //   Rafael Mizrahi   <rafim@mainsoft.com>
4 //   Erez Lotan       <erezl@mainsoft.com>
5 //   Vladimir Krasnov <vladimirk@mainsoft.com>
6 //
7 //
8 // Copyright (c) 2002-2005 Mainsoft Corporation.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
17 //
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
20 //
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //
29
30 using System;
31 using System.Web;
32 using System.Web.UI;
33 using System.Web.UI.WebControls;
34 using System.Web.UI.HtmlControls;
35
36 namespace GHTTests.System_Web_dll.System_Web_SessionState
37 {public class HttpSessionState_Item_I
38     : GHTBaseWeb {
39          #region Web Form Designer generated code
40          override protected void OnInit(EventArgs e) {
41                  //
42                  // CODEGEN: This call is required by the ASP.NET Web Form Designer.
43                  //
44                  InitializeComponent();
45                  base.OnInit(e);
46          }
47                 
48          /// <summary>
49          /// Required method for Designer support - do not modify
50          /// the contents of this method with the code editor.
51          /// </summary>
52          private void InitializeComponent() {    
53                  this.Load += new System.EventHandler(this.Page_Load);
54          }
55          #endregion
56
57          private void Page_Load(object sender, EventArgs e)
58          {
59                  HtmlForm form1 = (HtmlForm) (HtmlForm)this.FindControl("Form1");
60                  this.GHTTestBegin(form1);
61                  this.Session.Clear();
62                  this.GHTSubTestBegin("GHTSubTest1");
63                  try
64                  {
65                          this.Session["var1"] = "variable1";
66                          this.GHTSubTestAddResult((string)(this.Session[0]));
67                  }
68                  catch (Exception exception10)
69                  {
70                          // ProjectData.SetProjectError(exception10);
71                          Exception exception1 = exception10;
72                          this.GHTSubTestUnexpectedExceptionCaught(exception1);
73                          // ProjectData.ClearProjectError();
74                  }
75                  this.GHTSubTestEnd();
76                  this.GHTSubTestBegin("GHTSubTest2");
77                  try
78                  {
79                          this.GHTSubTestAddResult((string)(this.Session[0]));
80                  }
81                  catch (Exception exception11)
82                  {
83                          // ProjectData.SetProjectError(exception11);
84                          Exception exception2 = exception11;
85                          this.GHTSubTestUnexpectedExceptionCaught(exception2);
86                          // ProjectData.ClearProjectError();
87                  }
88                  this.GHTSubTestEnd();
89                  this.GHTSubTestBegin("GHTSubTest3");
90                  try
91                  {
92                          this.Session[0] = "changed variable1";
93                          this.GHTSubTestAddResult((string)(this.Session[0]));
94                  }
95                  catch (Exception exception12)
96                  {
97                          // ProjectData.SetProjectError(exception12);
98                          Exception exception3 = exception12;
99                          this.GHTSubTestUnexpectedExceptionCaught(exception3);
100                          // ProjectData.ClearProjectError();
101                  }
102                  this.GHTSubTestEnd();
103                  this.GHTSubTestBegin("GHTSubTest4");
104                  try
105                  {
106                          this.GHTSubTestAddResult((string)(this.Session[0x7d]));
107                          this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
108                  }
109                  catch (ArgumentOutOfRangeException exception13)
110                  {
111                          // ProjectData.SetProjectError(exception13);
112                          ArgumentOutOfRangeException exception4 = exception13;
113                          this.GHTSubTestExpectedExceptionCaught(exception4);
114                          // ProjectData.ClearProjectError();
115                  }
116                  catch (Exception exception14)
117                  {
118                          // ProjectData.SetProjectError(exception14);
119                          Exception exception5 = exception14;
120                          this.GHTSubTestUnexpectedExceptionCaught(exception5);
121                          // ProjectData.ClearProjectError();
122                  }
123                  this.GHTSubTestEnd();
124                  this.GHTSubTestBegin("GHTSubTest5");
125                  try
126                  {
127                          this.GHTSubTestAddResult((string)(this.Session[-1]));
128                          this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
129                  }
130                  catch (ArgumentOutOfRangeException exception15)
131                  {
132                          // ProjectData.SetProjectError(exception15);
133                          ArgumentOutOfRangeException exception6 = exception15;
134                          this.GHTSubTestExpectedExceptionCaught(exception6);
135                          // ProjectData.ClearProjectError();
136                  }
137                  catch (Exception exception16)
138                  {
139                          // ProjectData.SetProjectError(exception16);
140                          Exception exception7 = exception16;
141                          this.GHTSubTestUnexpectedExceptionCaught(exception7);
142                          // ProjectData.ClearProjectError();
143                  }
144                  this.GHTSubTestEnd();
145                  this.GHTSubTestBegin("GHTSubTest6");
146                  try
147                  {
148                          this.Session[0] = null;
149                          this.GHTSubTestAddResult((string)(this.Session[0]));
150                          this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
151                  }
152                  catch (ArgumentOutOfRangeException exception17)
153                  {
154                          // ProjectData.SetProjectError(exception17);
155                          ArgumentOutOfRangeException exception8 = exception17;
156                          this.GHTSubTestExpectedExceptionCaught(exception8);
157                          // ProjectData.ClearProjectError();
158                  }
159                  catch (Exception exception18)
160                  {
161                          // ProjectData.SetProjectError(exception18);
162                          Exception exception9 = exception18;
163                          this.GHTSubTestUnexpectedExceptionCaught(exception9);
164                          // ProjectData.ClearProjectError();
165                  }
166                  this.GHTSubTestEnd();
167                  this.GHTTestEnd();
168          }
169  
170  }
171 }