diff options
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs | 6 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/ChannelTests.cs | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/DotNetOAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs b/src/DotNetOAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs index 6ba1cfc..bbef6f2 100644 --- a/src/DotNetOAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs +++ b/src/DotNetOAuth.Test/Messaging/Bindings/StandardExpirationBindingElementTests.cs @@ -19,20 +19,20 @@ namespace DotNetOAuth.Test.Messaging.Bindings { message.Recipient = new Uri("http://localtest");
((IExpiringProtocolMessage)message).UtcCreationDate = DateTime.Parse("1/1/1990");
- Channel channel = CreateChannel(MessageProtection.Expiration, MessageProtection.Expiration);
+ Channel channel = CreateChannel(MessageProtection.Expiration);
channel.Send(message);
Assert.IsTrue(DateTime.UtcNow - ((IExpiringProtocolMessage)message).UtcCreationDate < TimeSpan.FromSeconds(3), "The timestamp on the message was not set on send.");
}
[TestMethod]
public void VerifyGoodTimestampIsAccepted() {
- this.Channel = CreateChannel(MessageProtection.Expiration, MessageProtection.Expiration);
+ this.Channel = CreateChannel(MessageProtection.Expiration);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false);
}
[TestMethod, ExpectedException(typeof(ExpiredMessageException))]
public void VerifyBadTimestampIsRejected() {
- this.Channel = CreateChannel(MessageProtection.Expiration, MessageProtection.Expiration);
+ this.Channel = CreateChannel(MessageProtection.Expiration);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow - StandardExpirationBindingElement.DefaultMaximumMessageAge - TimeSpan.FromSeconds(1), false);
}
}
diff --git a/src/DotNetOAuth.Test/Messaging/ChannelTests.cs b/src/DotNetOAuth.Test/Messaging/ChannelTests.cs index ac7e8d5..5ffd1d6 100644 --- a/src/DotNetOAuth.Test/Messaging/ChannelTests.cs +++ b/src/DotNetOAuth.Test/Messaging/ChannelTests.cs @@ -223,26 +223,26 @@ namespace DotNetOAuth.Test.Messaging { TestReplayProtectedMessage message = new TestReplayProtectedMessage(MessageTransport.Indirect);
message.Recipient = new Uri("http://localtest");
- this.Channel = CreateChannel(MessageProtection.ReplayProtection, MessageProtection.ReplayProtection);
+ this.Channel = CreateChannel(MessageProtection.ReplayProtection);
this.Channel.Send(message);
Assert.IsNotNull(((IReplayProtectedProtocolMessage)message).Nonce);
}
[TestMethod, ExpectedException(typeof(InvalidSignatureException))]
public void ReceivedInvalidSignature() {
- this.Channel = CreateChannel(MessageProtection.TamperProtection, MessageProtection.TamperProtection);
+ this.Channel = CreateChannel(MessageProtection.TamperProtection);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, true);
}
[TestMethod]
public void ReceivedReplayProtectedMessageJustOnce() {
- this.Channel = CreateChannel(MessageProtection.ReplayProtection, MessageProtection.ReplayProtection);
+ this.Channel = CreateChannel(MessageProtection.ReplayProtection);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false);
}
[TestMethod, ExpectedException(typeof(ReplayedMessageException))]
public void ReceivedReplayProtectedMessageTwice() {
- this.Channel = CreateChannel(MessageProtection.ReplayProtection, MessageProtection.ReplayProtection);
+ this.Channel = CreateChannel(MessageProtection.ReplayProtection);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false);
this.ParameterizedReceiveProtectedTest(DateTime.UtcNow, false);
}
|