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_LCID
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);
61 this.GHTSubTestBegin("GHTSubTest1");
64 this.GHTSubTestAddResult(this.Session.LCID.ToString());
66 catch (Exception exception8)
68 // ProjectData.SetProjectError(exception8);
69 Exception exception1 = exception8;
70 this.GHTSubTestUnexpectedExceptionCaught(exception1);
71 // ProjectData.ClearProjectError();
74 this.GHTSubTestBegin("GHTSubTest2");
77 this.Session.LCID = 0x7b;
78 this.GHTSubTestAddResult(this.Session.LCID.ToString());
79 this.GHTSubTestExpectedExceptionNotCaught("ArgumentException");
81 catch (ArgumentException exception9)
83 // ProjectData.SetProjectError(exception9);
84 ArgumentException exception2 = exception9;
85 this.GHTSubTestExpectedExceptionCaught(exception2);
86 // ProjectData.ClearProjectError();
88 catch (Exception exception10)
90 // ProjectData.SetProjectError(exception10);
91 Exception exception3 = exception10;
92 this.GHTSubTestUnexpectedExceptionCaught(exception3);
93 // ProjectData.ClearProjectError();
96 this.GHTSubTestBegin("GHTSubTest3");
99 this.Session.LCID = 0;
100 this.GHTSubTestAddResult(this.Session.LCID.ToString());
101 this.GHTSubTestExpectedExceptionNotCaught("ArgumentException");
103 catch (ArgumentException exception11)
105 // ProjectData.SetProjectError(exception11);
106 ArgumentException exception4 = exception11;
107 this.GHTSubTestExpectedExceptionCaught(exception4);
108 // ProjectData.ClearProjectError();
110 catch (Exception exception12)
112 // ProjectData.SetProjectError(exception12);
113 Exception exception5 = exception12;
114 this.GHTSubTestUnexpectedExceptionCaught(exception5);
115 // ProjectData.ClearProjectError();
117 this.GHTSubTestEnd();
118 this.GHTSubTestBegin("GHTSubTest4");
121 this.Session.LCID = -125;
122 this.GHTSubTestAddResult(this.Session.LCID.ToString());
123 this.GHTSubTestExpectedExceptionNotCaught("ArgumentOutOfRangeException");
125 catch (ArgumentOutOfRangeException exception13)
127 // ProjectData.SetProjectError(exception13);
128 ArgumentOutOfRangeException exception6 = exception13;
129 this.GHTSubTestExpectedExceptionCaught(exception6);
130 // ProjectData.ClearProjectError();
132 catch (Exception exception14)
134 // ProjectData.SetProjectError(exception14);
135 Exception exception7 = exception14;
136 this.GHTSubTestUnexpectedExceptionCaught(exception7);
137 // ProjectData.ClearProjectError();
139 this.GHTSubTestEnd();