System.Diagnostics.Tests.ProcessTests.TestStartWithMissingFile C# (CSharp) Method

TestStartWithMissingFile() private method

private TestStartWithMissingFile ( bool fullPath ) : void
fullPath bool
return void
        public void TestStartWithMissingFile(bool fullPath)
        {
            string path = Guid.NewGuid().ToString("N");
            if (fullPath)
            {
                path = Path.GetFullPath(path);
                Assert.True(Path.IsPathRooted(path));
            }
            else
            {
                Assert.False(Path.IsPathRooted(path));
            }
            Assert.False(File.Exists(path));

            Win32Exception e = Assert.Throws<Win32Exception>(() => Process.Start(path));
            Assert.NotEqual(0, e.NativeErrorCode);
        }
ProcessTests