summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-25 08:31:40 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-25 08:31:40 -0700
commita9fb696c40441e06ef817d7e28bae74c6a6cb6e4 (patch)
treee78f45395a2cee9592bceed86f3cbf2aba7c9022 /src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
parente99268dcde5f942a2577a2d4d271febf991b6fa1 (diff)
downloadDotNetOpenAuth-a9fb696c40441e06ef817d7e28bae74c6a6cb6e4.zip
DotNetOpenAuth-a9fb696c40441e06ef817d7e28bae74c6a6cb6e4.tar.gz
DotNetOpenAuth-a9fb696c40441e06ef817d7e28bae74c6a6cb6e4.tar.bz2
Added enough token management that the Appendix A scenario test is passing again.
Diffstat (limited to 'src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs')
-rw-r--r--src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
index 1de449a..2a42983 100644
--- a/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
+++ b/src/DotNetOAuth.Test/Scenarios/CoordinatingOAuthChannel.cs
@@ -16,6 +16,7 @@ namespace DotNetOAuth.Test.Scenarios {
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DotNetOAuth.Messaging.Reflection;
+ using DotNetOAuth.Messages;
/// <summary>
/// A special channel used in test simulations to pass messages directly between two parties.
@@ -92,8 +93,10 @@ namespace DotNetOAuth.Test.Scenarios {
directedMessage.Recipient,
directedMessage.HttpMethods);
cloned = (T)ctor.Invoke(new object[] { endpoint });
+ } else if ((ctor = message.GetType().GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[0], null)) != null) {
+ cloned = (T)ctor.Invoke(new object[0]);
} else {
- throw new InvalidOperationException("Unrecognized constructor signature.");
+ throw new InvalidOperationException("Unrecognized constructor signature on type " + message.GetType());
}
} else {
cloned = (T)Activator.CreateInstance(message.GetType(), true);