1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.MonoRail
.TestSupport
19 using System
.Collections
.Specialized
;
21 public class TestRequest
: MarshalByRefObject
23 private String protocol
= "http";
24 private String verb
= "GET";
26 private String virtualPath
;
27 private String
[] queryStringParams
;
28 private String
[] postParams
;
29 private String remoteAddress
= "127.0.0.1";
30 private String localAddress
= "127.0.0.1";
31 private int remotePort
= 81;
32 private int localPort
= 0;
33 private IntPtr userToken
= IntPtr
.Zero
;
34 private NameValueCollection headers
= new NameValueCollection();
35 private NameValueCollection serverVariables
= new NameValueCollection();
36 private CookieContainer cookies
= new CookieContainer();
43 public string Protocol
45 get { return protocol; }
46 set { protocol = value; }
49 public NameValueCollection Headers
51 get { return headers; }
52 set { headers = value; }
55 public NameValueCollection ServerVariables
57 get { return serverVariables; }
58 set { serverVariables = value; }
61 public string LocalAddress
63 get { return localAddress; }
64 set { localAddress = value; }
69 get { return remotePort; }
70 set { remotePort = value; }
75 get { return localPort; }
76 set { localPort = value; }
79 public IntPtr UserToken
81 get { return userToken; }
82 set { userToken = value; }
97 public string RemoteAddress
99 get { return remoteAddress; }
100 set { remoteAddress = value; }
103 public string VirtualPath
105 get { return virtualPath; }
106 set { virtualPath = value; }
109 public string[] QueryStringParams
111 get { return queryStringParams; }
112 set { queryStringParams = value; }
115 public string[] PostParams
117 get { return postParams; }
118 set { postParams = value; }
121 public CookieContainer Cookies
123 get { return cookies; }
124 set { cookies = value; }