diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestHttpRequest.cs | 82 |
1 files changed, 42 insertions, 40 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs index b868895..4c5ea4a 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpRequest.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpRequest.cs | |||
@@ -33,88 +33,89 @@ using HttpServer.FormDecoders; | |||
33 | 33 | ||
34 | namespace OpenSim.Tests.Common | 34 | namespace OpenSim.Tests.Common |
35 | { | 35 | { |
36 | /* | ||
36 | public class TestHttpRequest: IHttpRequest | 37 | public class TestHttpRequest: IHttpRequest |
37 | { | 38 | { |
38 | private string _uriPath; | 39 | private string _uriPath; |
39 | public bool BodyIsComplete | 40 | public bool BodyIsComplete |
40 | { | 41 | { |
41 | get { return true; } | 42 | get { return true; } |
42 | } | 43 | } |
43 | public string[] AcceptTypes | 44 | public string[] AcceptTypes |
44 | { | 45 | { |
45 | get {return _acceptTypes; } | 46 | get {return _acceptTypes; } |
46 | } | 47 | } |
47 | private string[] _acceptTypes; | 48 | private string[] _acceptTypes; |
48 | public Stream Body | 49 | public Stream Body |
49 | { | 50 | { |
50 | get { return _body; } | 51 | get { return _body; } |
51 | set { _body = value;} | 52 | set { _body = value;} |
52 | } | 53 | } |
53 | private Stream _body; | 54 | private Stream _body; |
54 | public ConnectionType Connection | 55 | public ConnectionType Connection |
55 | { | 56 | { |
56 | get { return _connection; } | 57 | get { return _connection; } |
57 | set { _connection = value; } | 58 | set { _connection = value; } |
58 | } | 59 | } |
59 | private ConnectionType _connection; | 60 | private ConnectionType _connection; |
60 | public int ContentLength | 61 | public int ContentLength |
61 | { | 62 | { |
62 | get { return _contentLength; } | 63 | get { return _contentLength; } |
63 | set { _contentLength = value; } | 64 | set { _contentLength = value; } |
64 | } | 65 | } |
65 | private int _contentLength; | 66 | private int _contentLength; |
66 | public NameValueCollection Headers | 67 | public NameValueCollection Headers |
67 | { | 68 | { |
68 | get { return _headers; } | 69 | get { return _headers; } |
69 | } | 70 | } |
70 | private NameValueCollection _headers = new NameValueCollection(); | 71 | private NameValueCollection _headers = new NameValueCollection(); |
71 | 72 | ||
72 | public string HttpVersion { get; set; } | 73 | public string HttpVersion { get; set; } |
73 | 74 | ||
74 | public string Method | 75 | public string Method |
75 | { | 76 | { |
76 | get { return _method; } | 77 | get { return _method; } |
77 | set { _method = value; } | 78 | set { _method = value; } |
78 | } | 79 | } |
79 | private string _method = null; | 80 | private string _method = null; |
80 | public HttpInput QueryString | 81 | public HttpInput QueryString |
81 | { | 82 | { |
82 | get { return _queryString; } | 83 | get { return _queryString; } |
83 | } | 84 | } |
84 | private HttpInput _queryString = null; | 85 | private HttpInput _queryString = null; |
85 | public Uri Uri | 86 | public Uri Uri |
86 | { | 87 | { |
87 | get { return _uri; } | 88 | get { return _uri; } |
88 | set { _uri = value; } | 89 | set { _uri = value; } |
89 | } | 90 | } |
90 | private Uri _uri = null; | 91 | private Uri _uri = null; |
91 | public string[] UriParts | 92 | public string[] UriParts |
92 | { | 93 | { |
93 | get { return _uri.Segments; } | 94 | get { return _uri.Segments; } |
94 | } | 95 | } |
95 | public HttpParam Param | 96 | public HttpParam Param |
96 | { | 97 | { |
97 | get { return null; } | 98 | get { return null; } |
98 | } | 99 | } |
99 | public HttpForm Form | 100 | public HttpForm Form |
100 | { | 101 | { |
101 | get { return null; } | 102 | get { return null; } |
102 | } | 103 | } |
103 | public bool IsAjax | 104 | public bool IsAjax |
104 | { | 105 | { |
105 | get { return false; } | 106 | get { return false; } |
106 | } | 107 | } |
107 | public RequestCookies Cookies | 108 | public RequestCookies Cookies |
108 | { | 109 | { |
109 | get { return null; } | 110 | get { return null; } |
110 | } | 111 | } |
111 | 112 | ||
112 | public TestHttpRequest() | 113 | public TestHttpRequest() |
113 | { | 114 | { |
114 | HttpVersion = "HTTP/1.1"; | 115 | HttpVersion = "HTTP/1.1"; |
115 | } | 116 | } |
116 | 117 | ||
117 | public TestHttpRequest(string contentEncoding, string contentType, string userAgent, | 118 | public TestHttpRequest(string contentEncoding, string contentType, string userAgent, |
118 | string remoteAddr, string remotePort, string[] acceptTypes, | 119 | string remoteAddr, string remotePort, string[] acceptTypes, |
119 | ConnectionType connectionType, int contentLength, Uri uri) : base() | 120 | ConnectionType connectionType, int contentLength, Uri uri) : base() |
120 | { | 121 | { |
@@ -136,7 +137,7 @@ namespace OpenSim.Tests.Common | |||
136 | { | 137 | { |
137 | _headers.Add(name, value); | 138 | _headers.Add(name, value); |
138 | } | 139 | } |
139 | public int AddToBody(byte[] bytes, int offset, int length) | 140 | public int AddToBody(byte[] bytes, int offset, int length) |
140 | { | 141 | { |
141 | return 0; | 142 | return 0; |
142 | } | 143 | } |
@@ -167,8 +168,9 @@ namespace OpenSim.Tests.Common | |||
167 | set | 168 | set |
168 | { | 169 | { |
169 | _uriPath = value; | 170 | _uriPath = value; |
170 | 171 | ||
171 | } | 172 | } |
172 | } | 173 | } |
173 | } | 174 | } |
175 | */ | ||
174 | } \ No newline at end of file | 176 | } \ No newline at end of file |