diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-05 17:38:00 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-05 17:38:00 -0800 |
commit | 9a3885e6992462122057f532b7cbcda3695ca6bd (patch) | |
tree | 679678fe05814b95e8aaf8e3ca441c3410f1c8c5 /src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs | |
parent | a292822196d0911a68fc56597ed52a8c84a41cbe (diff) | |
download | DotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.zip DotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.tar.gz DotNetOpenAuth-9a3885e6992462122057f532b7cbcda3695ca6bd.tar.bz2 |
Replaced API requirements for HttpRequestInfo with HttpRequestBase (new in .NET 3.5 SP1).
This makes us more friendly to MVC as well as mock-based unit testing.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs index 8d5295b..10bd59a 100644 --- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs +++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs @@ -11,6 +11,8 @@ namespace DotNetOpenAuth.Test.Mocks { using System.Linq; using System.Text; using System.Threading; + using System.Web; + using DotNetOpenAuth.Messaging; using DotNetOpenAuth.Messaging.Reflection; using DotNetOpenAuth.Test.OpenId; @@ -146,7 +148,7 @@ namespace DotNetOpenAuth.Test.Mocks { this.incomingMessageSignal.Set(); } - protected internal override HttpRequestInfo GetRequestFromContext() { + protected internal override HttpRequestBase GetRequestFromContext() { MessageReceivingEndpoint recipient; var messageData = this.AwaitIncomingMessage(out recipient); if (messageData != null) { @@ -191,12 +193,13 @@ namespace DotNetOpenAuth.Test.Mocks { return this.PrepareDirectResponse(message); } - protected override IDirectedProtocolMessage ReadFromRequestCore(HttpRequestInfo request) { - if (request.Message != null) { - this.ProcessMessageFilter(request.Message, false); + protected override IDirectedProtocolMessage ReadFromRequestCore(HttpRequestBase request) { + var mockRequest = (CoordinatingHttpRequestInfo)request; + if (mockRequest.Message != null) { + this.ProcessMessageFilter(mockRequest.Message, false); } - return request.Message; + return mockRequest.Message; } protected override IDictionary<string, string> ReadFromResponseCore(IncomingWebResponse response) { |