Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void
コード例 #1
0
        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>();
        }
コード例 #2
0
        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>();
        }
コード例 #3
0
        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>();
        }
コード例 #4
0
        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>();
        }