System.Diagnostics.Tests.ProcessStartInfoTests.TestUseShellExecuteProperty_SetAndGet_Windows C# (CSharp) Method

TestUseShellExecuteProperty_SetAndGet_Windows() private method

private TestUseShellExecuteProperty_SetAndGet_Windows ( ) : void
return void
        public void TestUseShellExecuteProperty_SetAndGet_Windows()
        {
            ProcessStartInfo psi = new ProcessStartInfo();
            Assert.False(psi.UseShellExecute);

            // Calling the setter
            Assert.Throws<PlatformNotSupportedException>(() => { psi.UseShellExecute = true; });
            psi.UseShellExecute = false;

            // Calling the getter
            Assert.False(psi.UseShellExecute, "UseShellExecute=true is not supported on onecore.");
        }