diff options
Diffstat (limited to 'src/DotNetOAuth.Test/Messaging/ResponseTests.cs')
-rw-r--r-- | src/DotNetOAuth.Test/Messaging/ResponseTests.cs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/DotNetOAuth.Test/Messaging/ResponseTests.cs b/src/DotNetOAuth.Test/Messaging/ResponseTests.cs deleted file mode 100644 index 5020d7e..0000000 --- a/src/DotNetOAuth.Test/Messaging/ResponseTests.cs +++ /dev/null @@ -1,39 +0,0 @@ -//-----------------------------------------------------------------------
-// <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;
-
- [TestClass]
- public class ResponseTests : TestBase {
- [TestMethod, ExpectedException(typeof(InvalidOperationException))]
- public void SendWithoutAspNetContext() {
- new Response().Send();
- }
-
- [TestMethod]
- public void Send() {
- StringWriter writer = new StringWriter();
- HttpRequest httpRequest = new HttpRequest("file", "http://server", string.Empty);
- HttpResponse httpResponse = new HttpResponse(writer);
- HttpContext context = new HttpContext(httpRequest, httpResponse);
- HttpContext.Current = context;
-
- Response response = new Response();
- response.Status = System.Net.HttpStatusCode.OK;
- response.Headers["someHeaderName"] = "someHeaderValue";
- response.Body = "some body";
- response.Send();
- string results = writer.ToString();
- // For some reason the only output in test is the body... the headers require a web host
- Assert.AreEqual(response.Body, results);
- }
- }
-}
|