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;
35 using System.Collections;
37 namespace GHTTests.System_Web_dll.System_Web
38 {public class HttpApplicationState_Item_S
40 #region Web Form Designer generated code
41 override protected void OnInit(EventArgs e) {
43 // CODEGEN: This call is required by the ASP.NET Web Form Designer.
45 InitializeComponent();
50 /// Required method for Designer support - do not modify
51 /// the contents of this method with the code editor.
53 private void InitializeComponent() {
54 this.Load += new System.EventHandler(this.Page_Load);
58 private void Page_Load(object sender, EventArgs e)
60 HtmlForm form1 = (HtmlForm) (HtmlForm)this.FindControl("Form1");
61 this.GHTTestBegin(form1);
62 this.GHTSubTestBegin("GHTSubTest1");
65 IEnumerator enumerator4 = null;
66 this.Application.Clear();
67 this.Application["var1"] = "variable1";
68 this.Application["var2"] = "variable2";
69 this.Application["var3"] = "variable3";
72 enumerator4 = this.Application.GetEnumerator();
73 while (enumerator4.MoveNext())
75 string text1 = (string)(enumerator4.Current);
76 if (this.Application[text1] == null)
78 this.GHTSubTestAddResult(("Application(\"" + text1) + "\") = null");
81 this.GHTSubTestAddResult((string)(("Application(\"" + text1) + "\") = " + this.Application[text1]));
86 if (enumerator4 is IDisposable)
88 ((IDisposable) enumerator4).Dispose();
92 catch (Exception exception5)
94 // ProjectData.SetProjectError(exception5);
95 Exception exception1 = exception5;
96 this.GHTSubTestUnexpectedExceptionCaught(exception1);
97 // ProjectData.ClearProjectError();
100 this.GHTSubTestBegin("GHTSubTest2");
103 IEnumerator enumerator3 = null;
104 this.Application["var1"] = "variable1";
105 this.Application["var2"] = "variable2";
106 this.Application["var3"] = "variable3";
109 enumerator3 = this.Application.GetEnumerator();
110 while (enumerator3.MoveNext())
112 string text2 = (string)(enumerator3.Current);
113 if (this.Application[text2] == null)
115 this.GHTSubTestAddResult(("Application(\"" + text2) + "\") = null");
118 this.GHTSubTestAddResult((string)(("Application(\"" + text2) + "\") = " + this.Application[text2]));
123 if (enumerator3 is IDisposable)
125 ((IDisposable) enumerator3).Dispose();
129 catch (Exception exception6)
131 // ProjectData.SetProjectError(exception6);
132 Exception exception2 = exception6;
133 this.GHTSubTestUnexpectedExceptionCaught(exception2);
134 // ProjectData.ClearProjectError();
136 this.GHTSubTestEnd();
137 this.GHTSubTestBegin("GHTSubTest3");
140 IEnumerator enumerator2 = null;
141 this.Application[""] = "";
142 this.Application["Nothing"] = null;
145 enumerator2 = this.Application.GetEnumerator();
146 while (enumerator2.MoveNext())
148 string text3 = (string)(enumerator2.Current);
149 if (this.Application[text3] == null)
151 this.GHTSubTestAddResult(("Application(\"" + text3) + "\") = null");
154 this.GHTSubTestAddResult((string)(("Application(\"" + text3) + "\") = " + this.Application[text3]));
159 if (enumerator2 is IDisposable)
161 ((IDisposable) enumerator2).Dispose();
165 catch (Exception exception7)
167 // ProjectData.SetProjectError(exception7);
168 Exception exception3 = exception7;
169 this.GHTSubTestUnexpectedExceptionCaught(exception3);
170 // ProjectData.ClearProjectError();
172 this.GHTSubTestEnd();
173 this.GHTSubTestBegin("GHTSubTest4");
176 IEnumerator enumerator1 = null;
179 enumerator1 = this.Application.GetEnumerator();
180 while (enumerator1.MoveNext())
182 string text4 = (string)(enumerator1.Current);
183 if (this.Application[text4 + "_" + text4] == null)
185 this.GHTSubTestAddResult(("Application(\"" + text4 + "_" + text4) + "\") = null");
188 this.GHTSubTestAddResult((string)(((("Application(\"" + text4) + "_") + text4) + "\") = " + this.Application[text4 + "_" + text4]));
193 if (enumerator1 is IDisposable)
195 ((IDisposable) enumerator1).Dispose();
199 catch (Exception exception8)
201 // ProjectData.SetProjectError(exception8);
202 Exception exception4 = exception8;
203 this.GHTSubTestUnexpectedExceptionCaught(exception4);
204 // ProjectData.ClearProjectError();
206 this.GHTSubTestEnd();