diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-07 11:21:08 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-08 01:08:57 -0800 |
commit | 6b09eb7244130b576858a461f904dd9db646fb7f (patch) | |
tree | a70588a90dc8c23b6633a5f255636afd2a90a4cf /src/DotNetOpenAuth.Test | |
parent | eb2952ea357476f073755c5a7d0c4cc08484487b (diff) | |
download | DotNetOpenAuth-6b09eb7244130b576858a461f904dd9db646fb7f.zip DotNetOpenAuth-6b09eb7244130b576858a461f904dd9db646fb7f.tar.gz DotNetOpenAuth-6b09eb7244130b576858a461f904dd9db646fb7f.tar.bz2 |
Fixed more test bugs having to do with stateless RP testing.
Diffstat (limited to 'src/DotNetOpenAuth.Test')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs index 2a08a96..6cb72d5 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs @@ -61,6 +61,11 @@ namespace DotNetOpenAuth.Test.OpenId { private void ParameterizedPositiveAuthenticationTest(bool sharedAssociation, bool positive, bool tamper) { foreach (Protocol protocol in Protocol.AllPracticalVersions) { foreach (bool statelessRP in new[] { false, true }) { + if (sharedAssociation && statelessRP) { + // Skip the invalid combination scenario. + continue; + } + TestLogger.InfoFormat("Beginning authentication test scenario. OpenID: {3}, Shared: {0}, positive: {1}, tamper: {2}, stateless: {3}", sharedAssociation, positive, tamper, protocol.Version, statelessRP); this.ParameterizedPositiveAuthenticationTest(protocol, statelessRP, sharedAssociation, positive, tamper); } @@ -68,6 +73,7 @@ namespace DotNetOpenAuth.Test.OpenId { } private void ParameterizedPositiveAuthenticationTest(Protocol protocol, bool statelessRP, bool sharedAssociation, bool positive, bool tamper) { + ErrorUtilities.VerifyArgument(!statelessRP || !sharedAssociation, "The RP cannot be stateless while sharing an association with the OP."); ErrorUtilities.VerifyArgument(positive || !tamper, "Cannot tamper with a negative response."); Uri userSetupUrl = protocol.Version.Major < 2 ? new Uri("http://usersetupurl") : null; ProviderSecuritySettings securitySettings = new ProviderSecuritySettings(); |