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

TestUseShellExecuteProperty_Redirects_NotSupported() private method

private TestUseShellExecuteProperty_Redirects_NotSupported ( int std ) : void
std int
return void
        public void TestUseShellExecuteProperty_Redirects_NotSupported(int std)
        {
            Process p = CreateProcessLong();
            p.StartInfo.UseShellExecute = true;

            switch (std)
            {
                case 0: p.StartInfo.RedirectStandardInput = true; break;
                case 1: p.StartInfo.RedirectStandardOutput = true; break;
                case 2: p.StartInfo.RedirectStandardError = true; break;
            }

            Assert.Throws<InvalidOperationException>(() => p.Start());
        }