public Task ItShouldCallAppDelegateWhenBeginProcessRequestCalled() { var httpHandler = new OwinHttpHandler(string.Empty, OwinBuilder.Build(WasCalledApp)); FakeHttpContext httpContext = NewHttpContext(new Uri("http://localhost")); Task task = Task.Factory.FromAsync(httpHandler.BeginProcessRequest, httpHandler.EndProcessRequest, httpContext, null); return task.ContinueWith(_ => { task.Exception.ShouldBe(null); WasCalled.ShouldBe(true); }); }
public Task ItShouldCallAppDelegateWhenBeginProcessRequestCalled() { var httpHandler = new OwinHttpHandler(string.Empty, OwinBuilder.Build(WasCalledApp)); FakeHttpContext httpContext = NewHttpContext(new Uri("http://localhost")); Task task = Task.Factory.FromAsync(httpHandler.BeginProcessRequest, httpHandler.EndProcessRequest, httpContext, null); return(task.ContinueWith(_ => { task.Exception.ShouldBe(null); WasCalled.ShouldBe(true); })); }