summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-01-30 21:04:20 -0800
committerAndrew <andrewarnott@gmail.com>2009-01-30 21:05:28 -0800
commite57dd7acc21239b0b8cc5e03298376570ffa8f5e (patch)
treef432320ff8e90c3fab1a902d8150ee8a093f11b8 /src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
parent65fbd52b372c1322fc03ffbac79d3e1dd9ab102b (diff)
downloadDotNetOpenAuth-e57dd7acc21239b0b8cc5e03298376570ffa8f5e.zip
DotNetOpenAuth-e57dd7acc21239b0b8cc5e03298376570ffa8f5e.tar.gz
DotNetOpenAuth-e57dd7acc21239b0b8cc5e03298376570ffa8f5e.tar.bz2
StyleCop fixes
Diffstat (limited to 'src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
index fb725d4..fd901c1 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
@@ -154,6 +154,22 @@ namespace DotNetOpenAuth.Test.ChannelElements {
this.ParameterizedRequestTest(HttpDeliveryMethods.PostRequest);
}
+ /// <summary>
+ /// Verifies that messages asking for special HTTP status codes get them.
+ /// </summary>
+ [TestMethod]
+ public void SendDirectMessageResponseHonorsHttpStatusCodes() {
+ IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired);
+ UserAgentResponse directResponse = this.accessor.SendDirectMessageResponse(message);
+ Assert.AreEqual(HttpStatusCode.OK, directResponse.Status);
+
+ var httpMessage = new TestDirectResponseMessageWithHttpStatus();
+ MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired, httpMessage);
+ httpMessage.HttpStatusCode = HttpStatusCode.NotAcceptable;
+ directResponse = this.accessor.SendDirectMessageResponse(httpMessage);
+ Assert.AreEqual(HttpStatusCode.NotAcceptable, directResponse.Status);
+ }
+
private static string CreateAuthorizationHeader(IDictionary<string, string> fields) {
if (fields == null) {
throw new ArgumentNullException("fields");
@@ -278,21 +294,5 @@ namespace DotNetOpenAuth.Test.ChannelElements {
Assert.AreEqual("Andrew", testMessage.Name);
Assert.AreEqual("http://hostb/pathB", testMessage.Location.AbsoluteUri);
}
-
- /// <summary>
- /// Verifies that messages asking for special HTTP status codes get them.
- /// </summary>
- [TestMethod]
- public void SendDirectMessageResponseHonorsHttpStatusCodes() {
- IProtocolMessage message = MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired);
- UserAgentResponse directResponse = this.accessor.SendDirectMessageResponse(message);
- Assert.AreEqual(HttpStatusCode.OK, directResponse.Status);
-
- var httpMessage = new TestDirectResponseMessageWithHttpStatus();
- MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired, httpMessage);
- httpMessage.HttpStatusCode = HttpStatusCode.NotAcceptable;
- directResponse = this.accessor.SendDirectMessageResponse(httpMessage);
- Assert.AreEqual(HttpStatusCode.NotAcceptable, directResponse.Status);
- }
}
}