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

TestStartOnWindowsWithBadFileFormat() private method

private TestStartOnWindowsWithBadFileFormat ( ) : void
return void
        public void TestStartOnWindowsWithBadFileFormat()
        {
            string path = GetTestFilePath();
            File.Create(path).Dispose();

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