public void When_changing_cookie_container_after_disposing_then_then_should_throw() { var handler = new OwinHttpMessageHandler(AppFuncHelpers.NoopAppFunc); handler.Dispose(); Action act = () => { handler.CookieContainer = new CookieContainer(); }; act.ShouldThrow <InvalidOperationException>(); }
public void When_changing_use_cookies_after_disposing_then_should_throw() { var handler = new OwinHttpMessageHandler(_ => Task.FromResult(0)); handler.Dispose(); Action act = () => { handler.UseCookies = true; }; act.ShouldThrow <InvalidOperationException>(); }
public void When_changing_cookie_container_after_disposing_then_then_should_throw() { var handler = new OwinHttpMessageHandler(AppFuncHelpers.NoopAppFunc); handler.Dispose(); Action act = () => { handler.CookieContainer = new CookieContainer(); }; act.ShouldThrow<InvalidOperationException>(); }
public void When_changing_use_cookies_after_disposing_then_should_throw() { var handler = new OwinHttpMessageHandler(_ => Task.FromResult(0)); handler.Dispose(); Action act = () => { handler.UseCookies = true; }; act.ShouldThrow<InvalidOperationException>(); }