diff options
Diffstat (limited to 'src/DotNetOAuth.Test/Mocks')
-rw-r--r-- | src/DotNetOAuth.Test/Mocks/TestBadChannel.cs | 8 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Mocks/TestChannel.cs | 12 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs | 8 |
3 files changed, 9 insertions, 19 deletions
diff --git a/src/DotNetOAuth.Test/Mocks/TestBadChannel.cs b/src/DotNetOAuth.Test/Mocks/TestBadChannel.cs index 20fe03a..4c06980 100644 --- a/src/DotNetOAuth.Test/Mocks/TestBadChannel.cs +++ b/src/DotNetOAuth.Test/Mocks/TestBadChannel.cs @@ -30,13 +30,5 @@ namespace DotNetOAuth.Test.Mocks { protected override void SendDirectMessageResponse(IProtocolMessage response) {
throw new NotImplementedException();
}
-
- protected override void ReportErrorToUser(ProtocolException exception) {
- throw new NotImplementedException();
- }
-
- protected override void ReportErrorAsDirectResponse(ProtocolException exception) {
- throw new NotImplementedException();
- }
}
}
diff --git a/src/DotNetOAuth.Test/Mocks/TestChannel.cs b/src/DotNetOAuth.Test/Mocks/TestChannel.cs index 632257e..359019f 100644 --- a/src/DotNetOAuth.Test/Mocks/TestChannel.cs +++ b/src/DotNetOAuth.Test/Mocks/TestChannel.cs @@ -17,23 +17,15 @@ namespace DotNetOAuth.Test.Mocks { }
protected internal override IProtocolMessage Request(IDirectedProtocolMessage request) {
- throw new NotImplementedException();
+ throw new NotImplementedException("Request");
}
protected internal override IProtocolMessage ReadFromResponse(System.IO.Stream responseStream) {
- throw new NotImplementedException();
+ throw new NotImplementedException("ReadFromResponse");
}
protected override void SendDirectMessageResponse(IProtocolMessage response) {
throw new NotImplementedException("SendDirectMessageResponse");
}
-
- protected override void ReportErrorToUser(ProtocolException exception) {
- throw new NotImplementedException();
- }
-
- protected override void ReportErrorAsDirectResponse(ProtocolException exception) {
- throw new NotImplementedException();
- }
}
}
diff --git a/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs b/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs index 6972624..0e600b5 100644 --- a/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs +++ b/src/DotNetOAuth.Test/Mocks/TestDirectedMessage.cs @@ -11,6 +11,12 @@ namespace DotNetOAuth.Test.Mocks { [DataContract(Namespace = Protocol.DataContractNamespaceV10)]
internal class TestDirectedMessage : IDirectedProtocolMessage {
+ private MessageTransport transport;
+
+ internal TestDirectedMessage(MessageTransport transport) {
+ this.transport = transport;
+ }
+
[DataMember(Name = "age", IsRequired = true)]
public int Age { get; set; }
[DataMember]
@@ -33,7 +39,7 @@ namespace DotNetOAuth.Test.Mocks { }
MessageTransport IProtocolMessage.Transport {
- get { return MessageTransport.Direct; }
+ get { return this.transport; }
}
void IProtocolMessage.EnsureValidMessage() {
|