summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/Mocks
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-01-12 21:39:26 -0800
committerAndrew <andrewarnott@gmail.com>2009-01-12 21:39:26 -0800
commit3b27d8a84a1f1745fcdf8191dfb6ed276bc7fbff (patch)
tree0e97e6f3b87840406dd81c15538bc6d550742e3a /src/DotNetOpenAuth.Test/Mocks
parent5a8a7e76d9f8d57e295c83905a2e5c5ef2348077 (diff)
downloadDotNetOpenAuth-3b27d8a84a1f1745fcdf8191dfb6ed276bc7fbff.zip
DotNetOpenAuth-3b27d8a84a1f1745fcdf8191dfb6ed276bc7fbff.tar.gz
DotNetOpenAuth-3b27d8a84a1f1745fcdf8191dfb6ed276bc7fbff.tar.bz2
Fixed the DirectWebResponse bug that broke the OAuth sample.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks')
-rw-r--r--src/DotNetOpenAuth.Test/Mocks/MockHttpRequest.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/MockHttpRequest.cs b/src/DotNetOpenAuth.Test/Mocks/MockHttpRequest.cs
index 6c853af..78e66ca 100644
--- a/src/DotNetOpenAuth.Test/Mocks/MockHttpRequest.cs
+++ b/src/DotNetOpenAuth.Test/Mocks/MockHttpRequest.cs
@@ -72,7 +72,7 @@ namespace DotNetOpenAuth.Test.Mocks {
sw.Write(responseBody);
sw.Flush();
stream.Seek(0, SeekOrigin.Begin);
- this.RegisterMockResponse(new DirectWebResponse(responseUri, responseUri, headers ?? new WebHeaderCollection(), HttpStatusCode.OK, contentType, contentEncoding, stream));
+ this.RegisterMockResponse(new CachedDirectWebResponse(responseUri, responseUri, headers ?? new WebHeaderCollection(), HttpStatusCode.OK, contentType, contentEncoding, stream));
}
internal void RegisterMockXrdsResponses(IDictionary<string, string> requestUriAndResponseBody) {
@@ -169,7 +169,7 @@ namespace DotNetOpenAuth.Test.Mocks {
var redirectionHeaders = new WebHeaderCollection {
{ HttpResponseHeader.Location, redirectLocation.AbsoluteUri },
};
- DirectWebResponse response = new DirectWebResponse(origin, origin, redirectionHeaders, HttpStatusCode.Redirect, null, null, new MemoryStream());
+ DirectWebResponse response = new CachedDirectWebResponse(origin, origin, redirectionHeaders, HttpStatusCode.Redirect, null, null, new MemoryStream());
this.RegisterMockResponse(response);
}
@@ -182,7 +182,7 @@ namespace DotNetOpenAuth.Test.Mocks {
} else {
////Assert.Fail("Unexpected HTTP request: {0}", uri);
Logger.WarnFormat("Unexpected HTTP request: {0}", request.RequestUri);
- return new DirectWebResponse(request.RequestUri, request.RequestUri, new WebHeaderCollection(), HttpStatusCode.NotFound, "text/html", null, new MemoryStream());
+ return new CachedDirectWebResponse(request.RequestUri, request.RequestUri, new WebHeaderCollection(), HttpStatusCode.NotFound, "text/html", null, new MemoryStream());
}
}
}