summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Messaging
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-03-15 18:04:41 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-03-15 18:04:41 -0700
commiteca38cd0d1d360d6d5ee3afbe3759a6efb6a5acf (patch)
treef0f3e84986b87d6302ce3e4de06a229d2ab835f8 /src/DotNetOpenAuth.Test/Messaging
parentdf342fb180ae32ba8ce3443862b38e02cdea8b8d (diff)
downloadDotNetOpenAuth-eca38cd0d1d360d6d5ee3afbe3759a6efb6a5acf.zip
DotNetOpenAuth-eca38cd0d1d360d6d5ee3afbe3759a6efb6a5acf.tar.gz
DotNetOpenAuth-eca38cd0d1d360d6d5ee3afbe3759a6efb6a5acf.tar.bz2
Renamed a couple of methods:
PrepareMessageForSending -> ProcessOutgoingMessage VerifyMessageAfterReceiving -> ProcessIncomingMessage
Diffstat (limited to 'src/DotNetOpenAuth.Test/Messaging')
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs14
-rw-r--r--src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
index eaf59e0..26ce01c 100644
--- a/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/Bindings/StandardReplayProtectionBindingElementTests.cs
@@ -40,13 +40,13 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
/// </summary>
[TestMethod]
public void RandomCharactersTest() {
- Assert.IsNotNull(this.nonceElement.PrepareMessageForSending(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessOutgoingMessage(this.message));
Assert.IsNotNull(this.message.Nonce, "No nonce was set on the message.");
Assert.AreNotEqual(0, this.message.Nonce.Length, "The generated nonce was empty.");
string firstNonce = this.message.Nonce;
// Apply another nonce and verify that they are different than the first ones.
- Assert.IsNotNull(this.nonceElement.PrepareMessageForSending(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessOutgoingMessage(this.message));
Assert.IsNotNull(this.message.Nonce, "No nonce was set on the message.");
Assert.AreNotEqual(0, this.message.Nonce.Length, "The generated nonce was empty.");
Assert.AreNotEqual(firstNonce, this.message.Nonce, "The two generated nonces are identical.");
@@ -58,7 +58,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
[TestMethod]
public void ValidMessageReceivedTest() {
this.message.Nonce = "a";
- Assert.IsNotNull(this.nonceElement.PrepareMessageForReceiving(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessIncomingMessage(this.message));
}
/// <summary>
@@ -68,7 +68,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
public void ValidMessageNoNonceReceivedTest() {
this.message.Nonce = string.Empty;
this.nonceElement.AllowZeroLengthNonce = true;
- Assert.IsNotNull(this.nonceElement.PrepareMessageForReceiving(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessIncomingMessage(this.message));
}
/// <summary>
@@ -78,7 +78,7 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
public void InvalidMessageNoNonceReceivedTest() {
this.message.Nonce = string.Empty;
this.nonceElement.AllowZeroLengthNonce = false;
- Assert.IsNotNull(this.nonceElement.PrepareMessageForReceiving(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessIncomingMessage(this.message));
}
/// <summary>
@@ -87,10 +87,10 @@ namespace DotNetOpenAuth.Test.Messaging.Bindings {
[TestMethod, ExpectedException(typeof(ReplayedMessageException))]
public void ReplayDetectionTest() {
this.message.Nonce = "a";
- Assert.IsNotNull(this.nonceElement.PrepareMessageForReceiving(this.message));
+ Assert.IsNotNull(this.nonceElement.ProcessIncomingMessage(this.message));
// Now receive the same message again. This should throw because it's a message replay.
- this.nonceElement.PrepareMessageForReceiving(this.message);
+ this.nonceElement.ProcessIncomingMessage(this.message);
}
}
}
diff --git a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
index ca902cd..ac94ea2 100644
--- a/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
+++ b/src/DotNetOpenAuth.Test/Messaging/ChannelTests.cs
@@ -254,7 +254,7 @@ namespace DotNetOpenAuth.Test.Messaging {
new MockSigningBindingElement(),
new MockSigningBindingElement());
Channel_Accessor accessor = Channel_Accessor.AttachShadow(channel);
- accessor.PrepareMessageForSending(new TestSignedDirectedMessage());
+ accessor.ProcessOutgoingMessage(new TestSignedDirectedMessage());
}
[TestMethod]