diff options
Diffstat (limited to 'src/DotNetOAuth.Test')
-rw-r--r-- | src/DotNetOAuth.Test/MessageSerializerTest.cs | 15 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Mocks/TestMessage.cs | 28 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/ServiceProviderTest.cs | 13 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Settings.StyleCop | 25 |
4 files changed, 66 insertions, 15 deletions
diff --git a/src/DotNetOAuth.Test/MessageSerializerTest.cs b/src/DotNetOAuth.Test/MessageSerializerTest.cs index 9faebfe..24b7c9c 100644 --- a/src/DotNetOAuth.Test/MessageSerializerTest.cs +++ b/src/DotNetOAuth.Test/MessageSerializerTest.cs @@ -1,8 +1,17 @@ -using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+//-----------------------------------------------------------------------
+// <copyright file="MessageSerializerTest.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth.Test {
+ using System;
+ using System.Collections.Generic;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+ /// <summary>
+ /// Tests for the <see cref="MessageSerializer"/> class.
+ /// </summary>
[TestClass()]
public class MessageSerializerTest : TestBase {
[TestMethod, ExpectedException(typeof(ArgumentNullException))]
diff --git a/src/DotNetOAuth.Test/Mocks/TestMessage.cs b/src/DotNetOAuth.Test/Mocks/TestMessage.cs index 6fbac65..1fb58ad 100644 --- a/src/DotNetOAuth.Test/Mocks/TestMessage.cs +++ b/src/DotNetOAuth.Test/Mocks/TestMessage.cs @@ -1,9 +1,15 @@ -using System.Runtime.Serialization;
-using System;
+//-----------------------------------------------------------------------
+// <copyright file="TestMessage.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth.Test.Mocks {
- [DataContract(Namespace = Protocol.DataContractNamespace)]
- class TestMessage : IProtocolMessage {
+ using System;
+ using System.Runtime.Serialization;
+
+ [DataContract(Namespace = Protocol.DataContractNamespaceV10)]
+ internal class TestMessage : IProtocolMessage {
[DataMember(Name = "age", IsRequired = true)]
public int Age { get; set; }
[DataMember]
@@ -15,14 +21,18 @@ namespace DotNetOAuth.Test.Mocks { #region IProtocolMessage Members
- void IProtocolMessage.EnsureValidMessage() {
- if (EmptyMember != null || Age < 0) {
- throw new ProtocolException();
- }
+ Protocol IProtocolMessage.Protocol {
+ get { return Protocol.V10; }
}
MessageTransport IProtocolMessage.Transport {
- get { return MessageTransport.Direct; }
+ get { return MessageTransport.Direct; }
+ }
+
+ void IProtocolMessage.EnsureValidMessage() {
+ if (this.EmptyMember != null || this.Age < 0) {
+ throw new ProtocolException();
+ }
}
#endregion
diff --git a/src/DotNetOAuth.Test/ServiceProviderTest.cs b/src/DotNetOAuth.Test/ServiceProviderTest.cs index 38836f4..d4bced7 100644 --- a/src/DotNetOAuth.Test/ServiceProviderTest.cs +++ b/src/DotNetOAuth.Test/ServiceProviderTest.cs @@ -1,7 +1,16 @@ -using System;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+//-----------------------------------------------------------------------
+// <copyright file="ServiceProviderTest.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth.Test {
+ using System;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+ /// <summary>
+ /// Tests for the <see cref="ServiceProvider"/> class.
+ /// </summary>
[TestClass]
public class ServiceProviderTest : TestBase {
/// <summary>
diff --git a/src/DotNetOAuth.Test/Settings.StyleCop b/src/DotNetOAuth.Test/Settings.StyleCop index 7f55ce6..100fae5 100644 --- a/src/DotNetOAuth.Test/Settings.StyleCop +++ b/src/DotNetOAuth.Test/Settings.StyleCop @@ -1 +1,24 @@ -<StyleCopSettings Version="4.3" />
\ No newline at end of file +<StyleCopSettings Version="4.3">
+ <Analyzers>
+ <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.DocumentationRules">
+ <Rules>
+ <Rule Name="ElementsMustBeDocumented">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ </Rules>
+ <AnalyzerSettings />
+ </Analyzer>
+ <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.LayoutRules">
+ <Rules>
+ <Rule Name="SingleLineCommentMustBePrecededByBlankLine">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
+ </Rules>
+ <AnalyzerSettings />
+ </Analyzer>
+ </Analyzers>
+</StyleCopSettings>
\ No newline at end of file |