diff options
Diffstat (limited to 'src/DotNetOAuth.Test/Messaging')
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/HttpRequestInfoTests.cs | 10 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/ProtocolExceptionTests.cs | 15 | ||||
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/ResponseTests.cs (renamed from src/DotNetOAuth.Test/Messaging/ResponseTest.cs) | 12 |
3 files changed, 19 insertions, 18 deletions
diff --git a/src/DotNetOAuth.Test/Messaging/HttpRequestInfoTests.cs b/src/DotNetOAuth.Test/Messaging/HttpRequestInfoTests.cs index 108a147..70fa1d0 100644 --- a/src/DotNetOAuth.Test/Messaging/HttpRequestInfoTests.cs +++ b/src/DotNetOAuth.Test/Messaging/HttpRequestInfoTests.cs @@ -4,17 +4,17 @@ // </copyright>
//-----------------------------------------------------------------------
-using System.Web;
-using DotNetOAuth.Messaging;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
namespace DotNetOAuth.Test.Messaging {
+ using System.Web;
+ using DotNetOAuth.Messaging;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class HttpRequestInfoTests : TestBase {
[TestMethod]
public void CtorRequest() {
HttpRequest request = new HttpRequest("file", "http://someserver?a=b", "a=b");
- //request.Headers["headername"] = "headervalue"; // PlatformNotSupportedException prevents us mocking this up
+ ////request.Headers["headername"] = "headervalue"; // PlatformNotSupportedException prevents us mocking this up
HttpRequestInfo info = new HttpRequestInfo(request);
Assert.AreEqual(request.Headers["headername"], info.Headers["headername"]);
Assert.AreEqual(request.Url.Query, info.Query);
diff --git a/src/DotNetOAuth.Test/Messaging/ProtocolExceptionTests.cs b/src/DotNetOAuth.Test/Messaging/ProtocolExceptionTests.cs index 9059e99..072b57c 100644 --- a/src/DotNetOAuth.Test/Messaging/ProtocolExceptionTests.cs +++ b/src/DotNetOAuth.Test/Messaging/ProtocolExceptionTests.cs @@ -1,11 +1,14 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using DotNetOAuth.Messaging;
+//-----------------------------------------------------------------------
+// <copyright file="ProtocolExceptionTests.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
namespace DotNetOAuth.Test.Messaging {
+ using System;
+ using DotNetOAuth.Messaging;
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
+
[TestClass]
public class ProtocolExceptionTests : TestBase {
[TestMethod]
diff --git a/src/DotNetOAuth.Test/Messaging/ResponseTest.cs b/src/DotNetOAuth.Test/Messaging/ResponseTests.cs index 6b49e62..5020d7e 100644 --- a/src/DotNetOAuth.Test/Messaging/ResponseTest.cs +++ b/src/DotNetOAuth.Test/Messaging/ResponseTests.cs @@ -1,20 +1,18 @@ //-----------------------------------------------------------------------
-// <copyright file="ResponseTest.cs" company="Andrew Arnott">
+// <copyright file="ResponseTests.cs" company="Andrew Arnott">
// Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace DotNetOAuth.Test.Messaging {
using System;
+ using System.IO;
+ using System.Web;
using DotNetOAuth.Messaging;
using Microsoft.VisualStudio.TestTools.UnitTesting;
- using System.Web;
- using System.IO;
- using System.Threading;
- using System.Text;
[TestClass]
- public class ResponseTest : TestBase {
+ public class ResponseTests : TestBase {
[TestMethod, ExpectedException(typeof(InvalidOperationException))]
public void SendWithoutAspNetContext() {
new Response().Send();
@@ -23,7 +21,7 @@ namespace DotNetOAuth.Test.Messaging { [TestMethod]
public void Send() {
StringWriter writer = new StringWriter();
- HttpRequest httpRequest = new HttpRequest("file", "http://server", "");
+ HttpRequest httpRequest = new HttpRequest("file", "http://server", string.Empty);
HttpResponse httpResponse = new HttpResponse(writer);
HttpContext context = new HttpContext(httpRequest, httpResponse);
HttpContext.Current = context;
|