diff options
Diffstat (limited to 'src/DotNetOAuth.Test/Mocks/TestMessage.cs')
-rw-r--r-- | src/DotNetOAuth.Test/Mocks/TestMessage.cs | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/DotNetOAuth.Test/Mocks/TestMessage.cs b/src/DotNetOAuth.Test/Mocks/TestMessage.cs deleted file mode 100644 index 0cb331c..0000000 --- a/src/DotNetOAuth.Test/Mocks/TestMessage.cs +++ /dev/null @@ -1,63 +0,0 @@ -//-----------------------------------------------------------------------
-// <copyright file="TestMessage.cs" company="Andrew Arnott">
-// Copyright (c) Andrew Arnott. All rights reserved.
-// </copyright>
-//-----------------------------------------------------------------------
-
-namespace DotNetOAuth.Test.Mocks {
- using System;
- using System.Collections.Generic;
- using System.Runtime.Serialization;
- using DotNetOAuth.Messaging;
- using DotNetOAuth.Messaging.Reflection;
-
- internal class TestMessage : IProtocolMessage {
- private MessageTransport transport;
- private Dictionary<string, string> extraData = new Dictionary<string, string>();
-
- internal TestMessage()
- : this(MessageTransport.Direct) {
- }
-
- internal TestMessage(MessageTransport transport) {
- this.transport = transport;
- }
-
- [MessagePart("age", IsRequired = true)]
- public int Age { get; set; }
- [MessagePart("Name")]
- public string Name { get; set; }
- [MessagePart]
- public string EmptyMember { get; set; }
- [MessagePart(null)] // null name tests that Location is still the name.
- public Uri Location { get; set; }
- [MessagePart(IsRequired = true)]
- public DateTime Timestamp { get; set; }
-
- #region IProtocolMessage Members
-
- Version IProtocolMessage.ProtocolVersion {
- get { return new Version(1, 0); }
- }
-
- MessageProtections IProtocolMessage.RequiredProtection {
- get { return MessageProtections.None; }
- }
-
- MessageTransport IProtocolMessage.Transport {
- get { return this.transport; }
- }
-
- IDictionary<string, string> IProtocolMessage.ExtraData {
- get { return this.extraData; }
- }
-
- void IProtocolMessage.EnsureValidMessage() {
- if (this.EmptyMember != null || this.Age < 0) {
- throw new ProtocolException();
- }
- }
-
- #endregion
- }
-}
|