public void BadRequestsGenerateValidErrorResponsesHosted() { try { using (AspNetHost host = AspNetHost.CreateHost(TestWebDirectory)) { Uri opEndpoint = new Uri(host.BaseUri, "/OpenIdProviderEndpoint.ashx"); var rp = new OpenIdRelyingParty(null); var nonOpenIdMessage = new Mocks.TestDirectedMessage(); nonOpenIdMessage.Recipient = opEndpoint; nonOpenIdMessage.HttpMethods = HttpDeliveryMethods.PostRequest; MessagingTestBase.GetStandardTestMessage(MessagingTestBase.FieldFill.AllRequired, nonOpenIdMessage); var response = rp.Channel.Request <DirectErrorResponse>(nonOpenIdMessage); Assert.IsNotNull(response.ErrorMessage); } } catch (FileNotFoundException ex) { Assert.Inconclusive("Unable to execute hosted ASP.NET tests because {0} could not be found. {1}", ex.FileName, ex.FusionLog); } }
public void SetUp() { Host = AspNetHost.CreateHost(TestSupport.TestWebDirectory); }