3 // Rafael Mizrahi <rafim@mainsoft.com>
4 // Erez Lotan <erezl@mainsoft.com>
5 // Vladimir Krasnov <vladimirk@mainsoft.com>
8 // Copyright (c) 2002-2005 Mainsoft Corporation.
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:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
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.
33 using System.Web.UI.WebControls;
34 using System.Web.UI.HtmlControls;
36 namespace GHTTests.System_Web_dll.System_Web_SessionState
37 {public class HttpSessionState_Item_I
39 #region Web Form Designer generated code
40 override protected void OnInit(EventArgs e) {
42 // CODEGEN: This call is required by the ASP.NET Web Form Designer.
44 InitializeComponent();
49 /// Required method for Designer support - do not modify
50 /// the contents of this method with the code editor.
52 private void InitializeComponent() {
53 this.Load += new System.EventHandler(this.Page_Load);
57 private void Page_Load(object sender, EventArgs e)
59 HtmlForm form1 = (HtmlForm) (HtmlForm)this.FindControl("Form1");
60 this.GHTTestBegin(form1);
62 this.GHTSubTestBegin("GHTSubTest1");
65 this.Session["var1"] = "variable1";
66 this.GHTSubTestAddResult((string)(this.Session[0]));
68 catch (Exception exception10)
70 // ProjectData.SetProjectError(exception10);
71 Exception exception1 = exception10;
72 this.GHTSubTestUnexpectedExceptionCaught(exception1);
73 // ProjectData.ClearProjectError();
76 this.GHTSubTestBegin("GHTSubTest2");
79 this.GHTSubTestAddResult((string)(this.Session[0]));
81 catch (Exception exception11)
83 // ProjectData.SetProjectError(exception11);
84 Exception exception2 = exception11;
85 this.GHTSubTestUnexpectedExceptionCaught(exception2);
86 // ProjectData.ClearProjectError();
89 this.GHTSubTestBegin("GHTSubTest3");
92 this.Session[0] = "changed variable1";
93 this.GHTSubTestAddResult((string)(this.Session[0]));
95 catch (Exception exception12)
97 // ProjectData.SetProjectError(exception12);
98 Exception exception3 = exception12;
99 this.GHTSubTestUnexpectedExceptionCaught(exception3);
100 // ProjectData.ClearProjectError();
102 this.GHTSubTestEnd();
103 this.GHTSubTestBegin("GHTSubTest4");
106 this.GHTSubTestAddResult((string)(this.Session[0x7d]));
107 this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
109 catch (ArgumentOutOfRangeException exception13)
111 // ProjectData.SetProjectError(exception13);
112 ArgumentOutOfRangeException exception4 = exception13;
113 this.GHTSubTestExpectedExceptionCaught(exception4);
114 // ProjectData.ClearProjectError();
116 catch (Exception exception14)
118 // ProjectData.SetProjectError(exception14);
119 Exception exception5 = exception14;
120 this.GHTSubTestUnexpectedExceptionCaught(exception5);
121 // ProjectData.ClearProjectError();
123 this.GHTSubTestEnd();
124 this.GHTSubTestBegin("GHTSubTest5");
127 this.GHTSubTestAddResult((string)(this.Session[-1]));
128 this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
130 catch (ArgumentOutOfRangeException exception15)
132 // ProjectData.SetProjectError(exception15);
133 ArgumentOutOfRangeException exception6 = exception15;
134 this.GHTSubTestExpectedExceptionCaught(exception6);
135 // ProjectData.ClearProjectError();
137 catch (Exception exception16)
139 // ProjectData.SetProjectError(exception16);
140 Exception exception7 = exception16;
141 this.GHTSubTestUnexpectedExceptionCaught(exception7);
142 // ProjectData.ClearProjectError();
144 this.GHTSubTestEnd();
145 this.GHTSubTestBegin("GHTSubTest6");
148 this.Session[0] = null;
149 this.GHTSubTestAddResult((string)(this.Session[0]));
150 this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
152 catch (ArgumentOutOfRangeException exception17)
154 // ProjectData.SetProjectError(exception17);
155 ArgumentOutOfRangeException exception8 = exception17;
156 this.GHTSubTestExpectedExceptionCaught(exception8);
157 // ProjectData.ClearProjectError();
159 catch (Exception exception18)
161 // ProjectData.SetProjectError(exception18);
162 Exception exception9 = exception18;
163 this.GHTSubTestUnexpectedExceptionCaught(exception9);
164 // ProjectData.ClearProjectError();
166 this.GHTSubTestEnd();