diff options
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks')
5 files changed, 11 insertions, 11 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs index 4afd2cf..e654f02 100644 --- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs +++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs @@ -118,7 +118,7 @@ namespace DotNetOpenAuth.Test.Mocks { /// </summary> /// <param name="message">The message to replay.</param> internal void Replay(IProtocolMessage message) { - this.VerifyMessageAfterReceiving(CloneSerializedParts(message)); + this.ProcessIncomingMessage(CloneSerializedParts(message)); } /// <summary> @@ -191,9 +191,9 @@ namespace DotNetOpenAuth.Test.Mocks { return accessor.ReadFromResponseCore(response); } - protected override void VerifyMessageAfterReceiving(IProtocolMessage message) { + protected override void ProcessIncomingMessage(IProtocolMessage message) { Channel_Accessor accessor = Channel_Accessor.AttachShadow(this.wrappedChannel); - accessor.VerifyMessageAfterReceiving(message); + accessor.ProcessIncomingMessage(message); } /// <summary> diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs index 2c02a7f..88ada15 100644 --- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs +++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingOAuthChannel.cs @@ -43,7 +43,7 @@ namespace DotNetOpenAuth.Test.Mocks { internal OutgoingWebResponse RequestProtectedResource(AccessProtectedResourceRequest request) { ((ITamperResistantOAuthMessage)request).HttpMethod = this.GetHttpMethod(((ITamperResistantOAuthMessage)request).HttpMethods); - this.PrepareMessageForSending(request); + this.ProcessOutgoingMessage(request); HttpRequestInfo requestInfo = this.SpoofHttpMethod(request); TestBase.TestLogger.InfoFormat("Sending protected resource request: {0}", requestInfo.Message); // Drop the outgoing message in the other channel's in-slot and let them know it's there. @@ -74,7 +74,7 @@ namespace DotNetOpenAuth.Test.Mocks { protected override OutgoingWebResponse PrepareDirectResponse(IProtocolMessage response) { this.RemoteChannel.incomingMessage = CloneSerializedParts(response, null); this.RemoteChannel.incomingMessageSignal.Set(); - return null; + return new OutgoingWebResponse(); // not used, but returning null is not allowed } protected override OutgoingWebResponse PrepareIndirectResponse(IDirectedProtocolMessage message) { diff --git a/src/DotNetOpenAuth.Test/Mocks/MockReplayProtectionBindingElement.cs b/src/DotNetOpenAuth.Test/Mocks/MockReplayProtectionBindingElement.cs index bde8380..75281e2 100644 --- a/src/DotNetOpenAuth.Test/Mocks/MockReplayProtectionBindingElement.cs +++ b/src/DotNetOpenAuth.Test/Mocks/MockReplayProtectionBindingElement.cs @@ -23,7 +23,7 @@ namespace DotNetOpenAuth.Test.Mocks { /// </summary> public Channel Channel { get; set; } - MessageProtections? IChannelBindingElement.PrepareMessageForSending(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessOutgoingMessage(IProtocolMessage message) { var replayMessage = message as IReplayProtectedProtocolMessage; if (replayMessage != null) { replayMessage.Nonce = "someNonce"; @@ -33,7 +33,7 @@ namespace DotNetOpenAuth.Test.Mocks { return null; } - MessageProtections? IChannelBindingElement.PrepareMessageForReceiving(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessIncomingMessage(IProtocolMessage message) { var replayMessage = message as IReplayProtectedProtocolMessage; if (replayMessage != null) { Assert.AreEqual("someNonce", replayMessage.Nonce, "The nonce didn't serialize correctly, or something"); diff --git a/src/DotNetOpenAuth.Test/Mocks/MockSigningBindingElement.cs b/src/DotNetOpenAuth.Test/Mocks/MockSigningBindingElement.cs index 803e471..32ada16 100644 --- a/src/DotNetOpenAuth.Test/Mocks/MockSigningBindingElement.cs +++ b/src/DotNetOpenAuth.Test/Mocks/MockSigningBindingElement.cs @@ -26,7 +26,7 @@ namespace DotNetOpenAuth.Test.Mocks { /// </summary> public Channel Channel { get; set; } - MessageProtections? IChannelBindingElement.PrepareMessageForSending(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessOutgoingMessage(IProtocolMessage message) { ITamperResistantProtocolMessage signedMessage = message as ITamperResistantProtocolMessage; if (signedMessage != null) { signedMessage.Signature = MessageSignature; @@ -36,7 +36,7 @@ namespace DotNetOpenAuth.Test.Mocks { return null; } - MessageProtections? IChannelBindingElement.PrepareMessageForReceiving(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessIncomingMessage(IProtocolMessage message) { ITamperResistantProtocolMessage signedMessage = message as ITamperResistantProtocolMessage; if (signedMessage != null) { if (signedMessage.Signature != MessageSignature) { diff --git a/src/DotNetOpenAuth.Test/Mocks/MockTransformationBindingElement.cs b/src/DotNetOpenAuth.Test/Mocks/MockTransformationBindingElement.cs index 4006f65..e88fe52 100644 --- a/src/DotNetOpenAuth.Test/Mocks/MockTransformationBindingElement.cs +++ b/src/DotNetOpenAuth.Test/Mocks/MockTransformationBindingElement.cs @@ -34,7 +34,7 @@ namespace DotNetOpenAuth.Test.Mocks { /// </summary> public Channel Channel { get; set; } - MessageProtections? IChannelBindingElement.PrepareMessageForSending(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessOutgoingMessage(IProtocolMessage message) { var testMessage = message as TestMessage; if (testMessage != null) { testMessage.Name = this.transform + testMessage.Name; @@ -44,7 +44,7 @@ namespace DotNetOpenAuth.Test.Mocks { return null; } - MessageProtections? IChannelBindingElement.PrepareMessageForReceiving(IProtocolMessage message) { + MessageProtections? IChannelBindingElement.ProcessIncomingMessage(IProtocolMessage message) { var testMessage = message as TestMessage; if (testMessage != null) { StringAssert.StartsWith(testMessage.Name, this.transform); |