summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
commit9dbb9aab73812202648c4e68d60261dd84d6c8e2 (patch)
tree5de139019a7b2f870f84c57cac36c0e489bd1e41 /src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
parent4b27c330fbfb3a260aa3bd6a9b1232ee3b53deb0 (diff)
parente7ce41355c38b3125729a62920231f274b7a2100 (diff)
downloadDotNetOpenAuth-origin/mono2.zip
DotNetOpenAuth-origin/mono2.tar.gz
DotNetOpenAuth-origin/mono2.tar.bz2
Merge branch 'v3.2' into mono2origin/mono2
Conflicts: src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
Diffstat (limited to 'src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
index 856f164..e215bc1 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/OAuthChannelTests.cs
@@ -4,7 +4,7 @@
// </copyright>
//-----------------------------------------------------------------------
-namespace DotNetOpenAuth.Test.ChannelElements {
+namespace DotNetOpenAuth.Test.OAuth.ChannelElements {
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
@@ -356,6 +356,7 @@ namespace DotNetOpenAuth.Test.ChannelElements {
{ "Name", "Andrew" },
{ "Location", "http://hostb/pathB" },
{ "Timestamp", XmlConvert.ToString(DateTime.UtcNow, XmlDateTimeSerializationMode.Utc) },
+ { "realm" , "someValue" },
};
IProtocolMessage requestMessage = this.channel.ReadFromRequest(CreateHttpRequestInfo(scheme, fields));
Assert.IsNotNull(requestMessage);
@@ -364,6 +365,12 @@ namespace DotNetOpenAuth.Test.ChannelElements {
Assert.AreEqual(15, testMessage.Age);
Assert.AreEqual("Andrew", testMessage.Name);
Assert.AreEqual("http://hostb/pathB", testMessage.Location.AbsoluteUri);
+ if (scheme == HttpDeliveryMethods.AuthorizationHeaderRequest) {
+ // The realm value should be ignored in the authorization header
+ Assert.IsFalse(((IMessage)testMessage).ExtraData.ContainsKey("realm"));
+ } else {
+ Assert.AreEqual("someValue", ((IMessage)testMessage).ExtraData["realm"]);
+ }
}
}
}