//----------------------------------------------------------------------- // // Copyright (c) Outercurve Foundation. All rights reserved. // //----------------------------------------------------------------------- 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; /// /// A Channel derived type that passes null to the protected constructor. /// internal class TestBadChannel : Channel { /// /// Initializes a new instance of the class. /// /// The message factory. Could be /// The binding elements. /// The host factories. internal TestBadChannel(IMessageFactory messageFactory, IChannelBindingElement[] bindingElements, IHostFactories hostFactories) : base(messageFactory, bindingElements, hostFactories) { } /// /// Initializes a new instance of the class. /// internal TestBadChannel() : this(new TestMessageFactory(), new IChannelBindingElement[0], new DefaultOpenIdHostFactories()) { } internal new void Create301RedirectResponse(IDirectedProtocolMessage message, IDictionary fields, bool payloadInFragment = false) { base.Create301RedirectResponse(message, fields, payloadInFragment); } internal new void CreateFormPostResponse(IDirectedProtocolMessage message, IDictionary fields) { base.CreateFormPostResponse(message, fields); } internal new void PrepareIndirectResponse(IDirectedProtocolMessage message) { base.PrepareIndirectResponse(message); } internal new IProtocolMessage Receive(Dictionary fields, MessageReceivingEndpoint recipient) { return base.Receive(fields, recipient); } internal new Task ReadFromRequestAsync(HttpRequestMessage request, CancellationToken cancellationToken) { return base.ReadFromRequestAsync(request, cancellationToken); } protected override Task> ReadFromResponseCoreAsync(HttpResponseMessage response, CancellationToken cancellationToken) { throw new NotImplementedException(); } protected override HttpResponseMessage PrepareDirectResponse(IProtocolMessage response) { throw new NotImplementedException(); } } }