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

TestCreateNoWindowProperty() private method

private TestCreateNoWindowProperty ( bool value ) : void
value bool
return void
        public void TestCreateNoWindowProperty(bool value)
        {
            Process testProcess = CreateProcessLong();
            try
            {
                testProcess.StartInfo.CreateNoWindow = value;
                testProcess.Start();

                Assert.Equal(value, testProcess.StartInfo.CreateNoWindow);
            }
            finally
            {
                if (!testProcess.HasExited)
                    testProcess.Kill();

                Assert.True(testProcess.WaitForExit(WaitInMS));
            }
        }