diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-10 17:38:02 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-10 17:38:02 -0700 |
commit | d33318e787968182f95c183d1891c9a7d59a3b69 (patch) | |
tree | cab197ff7930069fa1314348d361347b415186df /src/DotNetOAuth/OAuthChannel.cs | |
parent | 9a4d199c6397d2ce3d42e819f433c319a1f3ad20 (diff) | |
download | DotNetOpenAuth-d33318e787968182f95c183d1891c9a7d59a3b69.zip DotNetOpenAuth-d33318e787968182f95c183d1891c9a7d59a3b69.tar.gz DotNetOpenAuth-d33318e787968182f95c183d1891c9a7d59a3b69.tar.bz2 |
Started work on unit test code coverage of OAuthChannel.
Diffstat (limited to 'src/DotNetOAuth/OAuthChannel.cs')
-rw-r--r-- | src/DotNetOAuth/OAuthChannel.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/DotNetOAuth/OAuthChannel.cs b/src/DotNetOAuth/OAuthChannel.cs index aceaa42..052bdcd 100644 --- a/src/DotNetOAuth/OAuthChannel.cs +++ b/src/DotNetOAuth/OAuthChannel.cs @@ -21,7 +21,21 @@ namespace DotNetOAuth { /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
/// </summary>
internal OAuthChannel()
- : base(new OAuthMessageTypeProvider()) {
+ : this(new OAuthMessageTypeProvider()) {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OAuthChannel"/> class.
+ /// </summary>
+ /// <param name="messageTypeProvider">
+ /// An injected message type provider instance.
+ /// Except for mock testing, this should always be <see cref="OAuthMessageTypeProvider"/>.
+ /// </param>
+ /// <remarks>
+ /// This overload for testing purposes only.
+ /// </remarks>
+ internal OAuthChannel(IMessageTypeProvider messageTypeProvider)
+ : base(messageTypeProvider) {
}
/// <summary>
@@ -145,7 +159,7 @@ namespace DotNetOAuth { Response encodedResponse = new Response {
Body = responseBody,
OriginalMessage = response,
- Status = System.Net.HttpStatusCode.OK,
+ Status = HttpStatusCode.OK,
Headers = new System.Net.WebHeaderCollection(),
};
this.QueueIndirectOrResponseMessage(encodedResponse);
|