Added test
[mono.git] / mcs / class / System.Web / Test / standalone / test1 / index.aspx.cs
1 using System;
2 using System.Collections;
3 using System.Data;
4 using System.Web.UI.WebControls;
5
6 namespace test
7 {
8   public class SimplePage : System.Web.UI.Page
9   {
10     protected DataGrid testGrid;
11
12     public SimplePage()
13     {
14       this.Load += new System.EventHandler(this.Page_Load);
15     }
16
17     private void Page_Load(object o, EventArgs e)
18     {
19       IDataReader reader = new DummyReader ();
20       testGrid.DataSource = reader;
21       testGrid.DataBind();
22     }
23   }
24
25   class DummyReader : IDataReader, IEnumerable {
26         IEnumerator IEnumerable.GetEnumerator ()
27         {
28                 return new EnumThis ();
29         }
30
31         class EnumThis : IEnumerator {
32                 public bool MoveNext ()
33                 {
34                         return false;
35                 }
36
37                 public void Reset ()
38                 {
39                 }
40
41                 public object Current {
42                         get { return null; }
43                 }
44         }
45
46         public void Close ()
47         {
48                 Console.WriteLine ("Close");
49         }
50                 
51         public DataTable GetSchemaTable ()
52         {
53                 Console.WriteLine ("GetSchemaTable");
54                 return null;
55         }
56                 
57         public bool NextResult ()
58         {
59                 Console.WriteLine ("NextResult");
60                 return false;
61         }
62
63         public bool Read ()
64         {
65                 Console.WriteLine ("Read");
66                 return false;
67         }
68
69         public int Depth {
70                 get {
71                         Console.WriteLine ("Depth");
72                         return 0;
73                 }
74         }
75
76         public bool IsClosed {
77                 get {
78                         Console.WriteLine ("IsClosed");
79                         return false;
80                 }
81         }
82
83         public int RecordsAffected {
84                 get {
85                         Console.WriteLine ("RecordsAffected");
86                         return -1;
87                 }
88         }
89
90         public void Dispose ()
91         {
92                 Console.WriteLine ("Dispose");
93         }
94
95         public bool GetBoolean(int i)
96         {
97                 return false;
98         }
99
100         public  byte GetByte(int i)
101         {
102                 return 0;
103         }
104         public  long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length)
105         {
106                 return 0;
107         }
108
109
110         public  char GetChar(int i)
111         {
112                 return 'A';
113         }
114
115
116         public long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length)
117         {
118                 return 0;
119         }
120
121
122         public  IDataReader GetData(int i)
123         {
124                 return null;
125         }
126
127
128         public  string GetDataTypeName(int i)
129         {
130                 return null;
131         }
132
133
134         public  DateTime GetDateTime(int i)
135         {
136                 return DateTime.MinValue;
137         }
138
139
140         public  Decimal GetDecimal(int i)
141         {
142                 return 0;
143         }
144
145
146         public  double GetDouble(int i)
147         {
148                 return 0;
149         }
150
151
152         public  Type GetFieldType(int i)
153         {
154                 return null;
155         }
156
157
158         public  float GetFloat(int i)
159         {
160                 return 0;
161         }
162
163
164         public  Guid GetGuid(int i)
165         {
166                 return new Guid ();
167         }
168
169
170         public  short GetInt16(int i)
171         {
172                 return 0;
173         }
174
175
176         public  int GetInt32(int i)
177         {
178                 return 0;
179         }
180
181
182         public  long GetInt64(int i)
183         {
184                 return 0;
185         }
186
187
188         public  string GetName(int i)
189         {
190                 return null;
191         }
192
193
194         public  int GetOrdinal(string name)
195         {
196                 return 0;
197         }
198
199
200         public  string GetString(int i)
201         {
202                 return null;
203         }
204
205
206         public  object GetValue(int i)
207         {
208                 return null;
209         }
210
211
212         public  int GetValues(object[] values)
213         {
214                 return 0;
215         }
216
217
218         public  bool IsDBNull(int i)
219         {
220                 return false;
221         }
222
223
224         public int FieldCount {
225                 get { return 0; }
226         }
227
228         public object this [string name] {
229                 get { return null; }
230         }
231
232         public object this [int i] {
233                 get { return null; }
234         }
235   }
236 }