public void WindowsProxyUsePolicy_SetUsingInvalidEnum_ThrowArgumentOutOfRangeException() { var handler = new WinHttpHandler(); Assert.Throws<ArgumentOutOfRangeException>( () => { handler.WindowsProxyUsePolicy = (WindowsProxyUsePolicy)100; }); }