summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-05-23 18:27:49 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-05-23 18:27:49 -0700
commit97e3fc44a6911289baf3435febc0b003e56ad4e8 (patch)
tree851b5ce74ec7e93a5536c2e7af9bfe973e4546fd /src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs
parent0a5af17ff23523d176a77b0238cfd3e33b77aa73 (diff)
downloadDotNetOpenAuth-97e3fc44a6911289baf3435febc0b003e56ad4e8.zip
DotNetOpenAuth-97e3fc44a6911289baf3435febc0b003e56ad4e8.tar.gz
DotNetOpenAuth-97e3fc44a6911289baf3435febc0b003e56ad4e8.tar.bz2
Switched almost entirely over to Code Contracts across the entire library.
But some unit tests still fail, and there are other issues.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs')
-rw-r--r--src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs
index 3bbe6e3..16386de 100644
--- a/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs
+++ b/src/DotNetOpenAuth.Test/Mocks/CoordinatingChannel.cs
@@ -7,6 +7,7 @@
namespace DotNetOpenAuth.Test.Mocks {
using System;
using System.Collections.Generic;
+ using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading;
@@ -84,7 +85,7 @@ namespace DotNetOpenAuth.Test.Mocks {
/// <param name="outgoingMessageFilter">The outgoing message filter. May be null.</param>
internal CoordinatingChannel(Channel wrappedChannel, Action<IProtocolMessage> incomingMessageFilter, Action<IProtocolMessage> outgoingMessageFilter)
: base(GetMessageFactory(wrappedChannel), wrappedChannel.BindingElements.ToArray()) {
- ErrorUtilities.VerifyArgumentNotNull(wrappedChannel, "wrappedChannel");
+ Contract.Requires<ArgumentNullException>(wrappedChannel != null);
this.wrappedChannel = wrappedChannel;
this.incomingMessageFilter = incomingMessageFilter;
@@ -220,7 +221,7 @@ namespace DotNetOpenAuth.Test.Mocks {
/// channel since their message factory is not used.
/// </remarks>
protected virtual T CloneSerializedParts<T>(T message) where T : class, IProtocolMessage {
- ErrorUtilities.VerifyArgumentNotNull(message, "message");
+ Contract.Requires<ArgumentNullException>(message != null);
IProtocolMessage clonedMessage;
var messageAccessor = this.MessageDescriptions.GetAccessor(message);
@@ -251,7 +252,7 @@ namespace DotNetOpenAuth.Test.Mocks {
}
private static IMessageFactory GetMessageFactory(Channel channel) {
- ErrorUtilities.VerifyArgumentNotNull(channel, "channel");
+ Contract.Requires<ArgumentNullException>(channel != null);
Channel_Accessor accessor = Channel_Accessor.AttachShadow(channel);
return accessor.MessageFactory;