summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth.Test/Mocks/TestBadChannel.cs
blob: 5d6802f8d08c318261e73c75182238ea10f21545 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//-----------------------------------------------------------------------
// <copyright file="TestBadChannel.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOAuth.Test.Mocks {
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Text;
	using DotNetOAuth.Messaging;

	/// <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 TestMessageTypeProvider()) {
		}

		internal new void Create301RedirectResponse(IDirectedProtocolMessage message, IDictionary<string, string> fields) {
			base.Create301RedirectResponse(message, fields);
		}

		internal new void CreateFormPostResponse(IDirectedProtocolMessage message, IDictionary<string, string> fields) {
			base.CreateFormPostResponse(message, fields);
		}

		internal new void QueueIndirectOrResponseMessage(Response response) {
			base.QueueIndirectOrResponseMessage(response);
		}

		internal new void SendIndirectMessage(IDirectedProtocolMessage message) {
			base.SendIndirectMessage(message);
		}

		internal new IProtocolMessage Receive(Dictionary<string, string> fields) {
			return base.Receive(fields);
		}

		internal new IProtocolMessage ReadFromRequest(HttpRequestInfo request) {
			return base.ReadFromRequest(request);
		}

		protected internal override IProtocolMessage Request(IDirectedProtocolMessage request) {
			throw new NotImplementedException();
		}

		protected internal override IProtocolMessage ReadFromResponse(System.IO.Stream responseStream) {
			throw new NotImplementedException();
		}

		protected override void SendDirectMessageResponse(IProtocolMessage response) {
			throw new NotImplementedException();
		}
	}
}