summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-11-19 18:15:11 -0800
committerAndrew <andrewarnott@gmail.com>2008-11-19 18:15:11 -0800
commitd51be63270463542a308a9a2cef992b7d55baaa6 (patch)
tree27838618ab8688018dd73982c8791da3beb35d89
parent4b2df19ac9e4e9de15d350b4a0d0d85e4217b4d2 (diff)
downloadDotNetOpenAuth-d51be63270463542a308a9a2cef992b7d55baaa6.zip
DotNetOpenAuth-d51be63270463542a308a9a2cef992b7d55baaa6.tar.gz
DotNetOpenAuth-d51be63270463542a308a9a2cef992b7d55baaa6.tar.bz2
Added message version check to tests. Now 2/4 associate tests fail as expected.
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
index 24b54cf..eb0bccc 100644
--- a/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/AssociationHandshakeTests.cs
@@ -78,7 +78,8 @@ namespace DotNetOpenAuth.Test.OpenId {
op.SecuritySettings = this.ProviderSecuritySettings;
op.AutoRespond();
});
- coordinator.IncomingMessageFilter = (message) => {
+ coordinator.IncomingMessageFilter = message => {
+ Assert.AreSame(opDescription.Protocol.Version, message.ProtocolVersion, "The message was for version {0} but was expected to be for {1}.", message.ProtocolVersion, opDescription.Protocol.Version);
var associateSuccess = message as AssociateSuccessfulResponse;
var associateFailed = message as AssociateUnsuccessfulResponse;
if (associateSuccess != null) {
@@ -88,6 +89,9 @@ namespace DotNetOpenAuth.Test.OpenId {
associateUnsuccessfulResponse = associateFailed;
}
};
+ coordinator.OutgoingMessageFilter = message => {
+ Assert.AreSame(opDescription.Protocol.Version, message.ProtocolVersion, "The message was for version {0} but was expected to be for {1}.", message.ProtocolVersion, opDescription.Protocol.Version);
+ };
coordinator.Run();
if (expectSuccess) {