diff options
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs b/src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs index 263f0fd..344598f 100644 --- a/src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs +++ b/src/DotNetOpenAuth.Test/Mocks/TestBadChannel.cs @@ -7,15 +7,32 @@ namespace DotNetOpenAuth.Test.Mocks { using System; using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; using System.Web; using DotNetOpenAuth.Messaging; + using DotNetOpenAuth.OpenId; /// <summary> /// A Channel derived type that passes null to the protected constructor. /// </summary> internal class TestBadChannel : Channel { - internal TestBadChannel(bool badConstructorParam) - : base(badConstructorParam ? null : new TestMessageFactory()) { + /// <summary> + /// Initializes a new instance of the <see cref="TestBadChannel" /> class. + /// </summary> + /// <param name="messageFactory">The message factory. Could be <see cref="TestMessageFactory"/></param> + /// <param name="bindingElements">The binding elements.</param> + /// <param name="hostFactories">The host factories.</param> + internal TestBadChannel(IMessageFactory messageFactory, IChannelBindingElement[] bindingElements, IHostFactories hostFactories) + : base(messageFactory, bindingElements, hostFactories) { + } + + /// <summary> + /// Initializes a new instance of the <see cref="TestBadChannel"/> class. + /// </summary> + internal TestBadChannel() + : this(new TestMessageFactory(), new IChannelBindingElement[0], new DefaultOpenIdHostFactories()) { } internal new void Create301RedirectResponse(IDirectedProtocolMessage message, IDictionary<string, string> fields, bool payloadInFragment = false) { @@ -34,15 +51,15 @@ namespace DotNetOpenAuth.Test.Mocks { return base.Receive(fields, recipient); } - internal new IProtocolMessage ReadFromRequest(HttpRequestBase request) { - return base.ReadFromRequest(request); + internal new Task<IDirectedProtocolMessage> ReadFromRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) { + return base.ReadFromRequestAsync(request, cancellationToken); } - protected override IDictionary<string, string> ReadFromResponseCore(IncomingWebResponse response) { + protected override Task<IDictionary<string, string>> ReadFromResponseCoreAsync(HttpResponseMessage response, CancellationToken cancellationToken) { throw new NotImplementedException(); } - protected override OutgoingWebResponse PrepareDirectResponse(IProtocolMessage response) { + protected override HttpResponseMessage PrepareDirectResponse(IProtocolMessage response) { throw new NotImplementedException(); } } |