public async Task When_changing_cookie_container_after_initial_operation_then_should_throw()
{
var handler = new OwinHttpMessageHandler(AppFuncHelpers.NoopAppFunc);
using (var client = new HttpClient(handler))
{
await client.GetAsync("http://localhost/");
}
Action act = () => { handler.CookieContainer = new CookieContainer(); };
act.ShouldThrow<InvalidOperationException>();
}