diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-08-31 22:27:20 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-08-31 22:27:20 -0700 |
commit | 22cd5b99d428271139aa0005d5b3462979cc2720 (patch) | |
tree | 07826dae9e58ded2880a9e6bf656a46cb52e3505 /src/DotNetOpenAuth.Test/Hosting/HostingTests.cs | |
parent | 11fc039abf3c3902b3c697624111eb52448cb730 (diff) | |
parent | 0488ebcfaef60e51bfcf7958b4a59d0ba5332a0f (diff) | |
download | DotNetOpenAuth-22cd5b99d428271139aa0005d5b3462979cc2720.zip DotNetOpenAuth-22cd5b99d428271139aa0005d5b3462979cc2720.tar.gz DotNetOpenAuth-22cd5b99d428271139aa0005d5b3462979cc2720.tar.bz2 |
Merge branch 'v3.1' into v3.2
Conflicts:
src/DotNetOpenAuth.Test/OpenId/AuthenticationTests.cs
src/DotNetOpenAuth.vsmdi
src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs
Diffstat (limited to 'src/DotNetOpenAuth.Test/Hosting/HostingTests.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Hosting/HostingTests.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs b/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs index ff72c66..d7de7a1 100644 --- a/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs +++ b/src/DotNetOpenAuth.Test/Hosting/HostingTests.cs @@ -18,15 +18,19 @@ namespace DotNetOpenAuth.Test.Hosting { public class HostingTests : TestBase { [TestMethod] public void AspHostBasicTest() { - using (AspNetHost host = AspNetHost.CreateHost(TestWebDirectory)) { - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(host.BaseUri); - using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { - Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); - using (StreamReader sr = new StreamReader(response.GetResponseStream())) { - string content = sr.ReadToEnd(); - StringAssert.Contains(content, "Test home page"); + try { + using (AspNetHost host = AspNetHost.CreateHost(TestWebDirectory)) { + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(host.BaseUri); + using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + using (StreamReader sr = new StreamReader(response.GetResponseStream())) { + string content = sr.ReadToEnd(); + StringAssert.Contains(content, "Test home page"); + } } } + } catch (FileNotFoundException ex) { + Assert.Inconclusive("Unable to execute hosted ASP.NET tests because {0} could not be found. {1}", ex.FileName, ex.FusionLog); } } } |