summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-14 15:19:27 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-14 15:19:27 -0700
commit37d699e59e096802abbf9a2e976c8bc2f6ad8404 (patch)
tree696695f5ef9a7ff1db07783a46ef14df9657c263 /src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs
parentfc5e2ea3ff4d9aac85c9b40084d86c3fc72c65ce (diff)
downloadDotNetOpenAuth-37d699e59e096802abbf9a2e976c8bc2f6ad8404.zip
DotNetOpenAuth-37d699e59e096802abbf9a2e976c8bc2f6ad8404.tar.gz
DotNetOpenAuth-37d699e59e096802abbf9a2e976c8bc2f6ad8404.tar.bz2
Refactored MessageDescription to be per-Channel instead of appdomain static.
This allows for special scenarios (like OSIS tests) where individual tests might need to contrive special message serialization rules.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs')
-rw-r--r--src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs
index 8f09ef6..e890b6f 100644
--- a/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs
+++ b/src/DotNetOpenAuth.Test/OAuth/ChannelElements/SigningBindingElementBaseTests.cs
@@ -15,14 +15,14 @@ namespace DotNetOpenAuth.Test.ChannelElements {
public class SigningBindingElementBaseTests : MessagingTestBase {
[TestMethod]
public void BaseSignatureStringTest() {
- UnauthorizedTokenRequest message = CreateTestRequestTokenMessage();
+ UnauthorizedTokenRequest message = CreateTestRequestTokenMessage(this.MessageDescriptions);
Assert.AreEqual(
"GET&https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthGetRequestToken&oauth_consumer_key%3Dnerdbank.org%26oauth_nonce%3Dfe4045a3f0efdd1e019fa8f8ae3f5c38%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1222665749%26oauth_version%3D1.0%26scope%3Dhttp%253A%252F%252Fwww.google.com%252Fm8%252Ffeeds%252F",
- SigningBindingElementBase_Accessor.ConstructSignatureBaseString(message));
+ SigningBindingElementBase_Accessor.ConstructSignatureBaseString(message, MessageDictionary_Accessor.AttachShadow(this.MessageDescriptions.GetAccessor(message))));
}
- internal static UnauthorizedTokenRequest CreateTestRequestTokenMessage() {
+ internal static UnauthorizedTokenRequest CreateTestRequestTokenMessage(MessageDescriptionCollection messageDescriptions) {
MessageReceivingEndpoint endpoint = new MessageReceivingEndpoint("https://www.google.com/accounts/OAuthGetRequestToken", HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest);
UnauthorizedTokenRequest message = new UnauthorizedTokenRequest(endpoint);
message.ConsumerKey = "nerdbank.org";
@@ -30,7 +30,7 @@ namespace DotNetOpenAuth.Test.ChannelElements {
var signedMessage = (ITamperResistantOAuthMessage)message;
signedMessage.HttpMethod = "GET";
signedMessage.SignatureMethod = "HMAC-SHA1";
- MessageDictionary dictionary = new MessageDictionary(message);
+ MessageDictionary dictionary = messageDescriptions.GetAccessor(message);
dictionary["oauth_timestamp"] = "1222665749";
dictionary["oauth_nonce"] = "fe4045a3f0efdd1e019fa8f8ae3f5c38";
dictionary["scope"] = "http://www.google.com/m8/feeds/";