diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestHttpClientContext.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs index 5a55b09..7b20b8c 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpClientContext.cs | |||
@@ -36,13 +36,14 @@ using OpenSim.Framework; | |||
36 | 36 | ||
37 | namespace OpenSim.Tests.Common | 37 | namespace OpenSim.Tests.Common |
38 | { | 38 | { |
39 | /* | ||
39 | public class TestHttpClientContext: IHttpClientContext | 40 | public class TestHttpClientContext: IHttpClientContext |
40 | { | 41 | { |
41 | /// <summary> | 42 | /// <summary> |
42 | /// Bodies of responses from the server. | 43 | /// Bodies of responses from the server. |
43 | /// </summary> | 44 | /// </summary> |
44 | public string ResponseBody | 45 | public string ResponseBody |
45 | { | 46 | { |
46 | get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); } | 47 | get { return Encoding.UTF8.GetString(m_responseStream.ToArray()); } |
47 | } | 48 | } |
48 | 49 | ||
@@ -55,8 +56,8 @@ namespace OpenSim.Tests.Common | |||
55 | 56 | ||
56 | public bool IsSecured { get; set; } | 57 | public bool IsSecured { get; set; } |
57 | 58 | ||
58 | public bool Secured | 59 | public bool Secured |
59 | { | 60 | { |
60 | get { return IsSecured; } | 61 | get { return IsSecured; } |
61 | set { IsSecured = value; } | 62 | set { IsSecured = value; } |
62 | } | 63 | } |
@@ -66,7 +67,7 @@ namespace OpenSim.Tests.Common | |||
66 | Secured = secured; | 67 | Secured = secured; |
67 | } | 68 | } |
68 | 69 | ||
69 | public void Disconnect(SocketError error) | 70 | public void Disconnect(SocketError error) |
70 | { | 71 | { |
71 | // Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error); | 72 | // Console.WriteLine("TestHttpClientContext.Disconnect Received disconnect with status {0}", error); |
72 | } | 73 | } |
@@ -75,18 +76,18 @@ namespace OpenSim.Tests.Common | |||
75 | public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");} | 76 | public void Respond(string httpVersion, HttpStatusCode statusCode, string reason) {Console.WriteLine("xx");} |
76 | public void Respond(string body) { Console.WriteLine("xxx");} | 77 | public void Respond(string body) { Console.WriteLine("xxx");} |
77 | 78 | ||
78 | public void Send(byte[] buffer) | 79 | public void Send(byte[] buffer) |
79 | { | 80 | { |
80 | // Getting header data here | 81 | // Getting header data here |
81 | // Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer)); | 82 | // Console.WriteLine("xxxx: Got {0}", Encoding.UTF8.GetString(buffer)); |
82 | } | 83 | } |
83 | 84 | ||
84 | public void Send(byte[] buffer, int offset, int size) | 85 | public void Send(byte[] buffer, int offset, int size) |
85 | { | 86 | { |
86 | // Util.PrintCallStack(); | 87 | // Util.PrintCallStack(); |
87 | // | 88 | // |
88 | // Console.WriteLine( | 89 | // Console.WriteLine( |
89 | // "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", | 90 | // "TestHttpClientContext.Send(byte[], int, int) got offset={0}, size={1}, buffer={2}", |
90 | // offset, size, Encoding.UTF8.GetString(buffer)); | 91 | // offset, size, Encoding.UTF8.GetString(buffer)); |
91 | 92 | ||
92 | m_responseStream.Write(buffer, offset, size); | 93 | m_responseStream.Write(buffer, offset, size); |
@@ -107,4 +108,5 @@ namespace OpenSim.Tests.Common | |||
107 | /// </summary> | 108 | /// </summary> |
108 | public event EventHandler<RequestEventArgs> RequestReceived = delegate { }; | 109 | public event EventHandler<RequestEventArgs> RequestReceived = delegate { }; |
109 | } | 110 | } |
111 | */ | ||
110 | } \ No newline at end of file | 112 | } \ No newline at end of file |