summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-04-20 09:29:59 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2008-04-20 09:29:59 -0700
commit0c59596e43a2d7a854df5f99299ef4a23cf1fd6d (patch)
tree21777fe7aee7c52ae25bd4ecb63bfee9c78d34cd /src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs
parent6334f4a61dec7d12cd176389dd2b6c63f81c13ef (diff)
downloadDotNetOpenAuth-0c59596e43a2d7a854df5f99299ef4a23cf1fd6d.zip
DotNetOpenAuth-0c59596e43a2d7a854df5f99299ef4a23cf1fd6d.tar.gz
DotNetOpenAuth-0c59596e43a2d7a854df5f99299ef4a23cf1fd6d.tar.bz2
Fetch+Store extension in same message fix.
Improves exception and text generated when two extensions sharing a single namespace are added to the same message.
Diffstat (limited to 'src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs')
-rw-r--r--src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs b/src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs
index 91f8682..3fcbb3c 100644
--- a/src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs
+++ b/src/DotNetOpenId.Test/ExtensionsArgumentsManagerTests.cs
@@ -167,8 +167,12 @@ namespace DotNetOpenId.Test {
ExtensionArgumentsManager.CreateIncomingExtensions(args);
}
- [Test]
- public void AddExtensionArgsTwice() {
+ /// <summary>
+ /// Verifies that two extensions cannot be added in the same namespace
+ /// to the same message.
+ /// </summary>
+ [Test, ExpectedException(typeof(OpenIdException))]
+ public void AddExtensionArgsTwiceInSameNamespace() {
var args1 = new Dictionary<string, string>() {
{"k1", "v1"},
};
@@ -178,8 +182,6 @@ namespace DotNetOpenId.Test {
var mgr = ExtensionArgumentsManager.CreateOutgoingExtensions(protocol);
mgr.AddExtensionArguments("extTypeURI", args1);
mgr.AddExtensionArguments("extTypeURI", args2);
- var results = mgr.GetArgumentsToSend(false);
- Assert.AreEqual(3, results.Count);
}
[Test]