diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-06 23:44:33 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-03-08 01:08:55 -0800 |
commit | 5bec12cbcb9ceb80b3812b590e136b7ffa2ea1cb (patch) | |
tree | 41f0eaf3939a64c6503ab333c4f70ab22d9141d7 /src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs | |
parent | 66529893e591417eb0182de448a2705f583396e4 (diff) | |
download | DotNetOpenAuth-5bec12cbcb9ceb80b3812b590e136b7ffa2ea1cb.zip DotNetOpenAuth-5bec12cbcb9ceb80b3812b590e136b7ffa2ea1cb.tar.gz DotNetOpenAuth-5bec12cbcb9ceb80b3812b590e136b7ffa2ea1cb.tar.bz2 |
Added testing of full authentication in stateless mode. Many tests fail due to product bugs.
Diffstat (limited to 'src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs index 0167ecd..85f839f 100644 --- a/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs @@ -60,12 +60,14 @@ namespace DotNetOpenAuth.Test.OpenId { private void ParameterizedPositiveAuthenticationTest(bool sharedAssociation, bool positive, bool tamper) { foreach (Protocol protocol in Protocol.AllPracticalVersions) { - TestLogger.InfoFormat("Beginning authentication test scenario. OpenID: {3}, Shared: {0}, positive: {1}, tamper: {2}", sharedAssociation, positive, tamper, protocol.Version); - this.ParameterizedPositiveAuthenticationTest(protocol, sharedAssociation, positive, tamper); + foreach (bool statelessRP in new[] { false, true }) { + 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); + } } } - private void ParameterizedPositiveAuthenticationTest(Protocol protocol, bool sharedAssociation, bool positive, bool tamper) { + private void ParameterizedPositiveAuthenticationTest(Protocol protocol, bool statelessRP, bool sharedAssociation, bool positive, bool tamper) { 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(); @@ -159,6 +161,10 @@ namespace DotNetOpenAuth.Test.OpenId { } }; } + if (statelessRP) { + coordinator.RelyingParty = new OpenIdRelyingParty(null); + } + coordinator.Run(); } } |