diff --git a/dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs b/dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs index b38dc66..0ef9011 100644 --- a/dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs +++ b/dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs @@ -110,14 +110,11 @@ public virtual void Run(string path, TestInformation information) /// Path to file. /// Test information. /// Test running process. - protected virtual Process Run(string path, TestItem testItem) + protected virtual void Run(string path, TestItem testItem) { - ProcessStartInfo procStartInfo = GetProcessStartInfo(path, testItem); - Process process = null; - - using (process = new Process()) + using (var process = new Process()) { - process.StartInfo = procStartInfo; + process.StartInfo = GetProcessStartInfo(path, testItem); process.ErrorDataReceived += OnErrorDataReceivedEvent; process.OutputDataReceived += OnOutputDataReceivedEvent; process.Start(); @@ -127,7 +124,6 @@ protected virtual Process Run(string path, TestItem testItem) process.OutputDataReceived -= OnOutputDataReceivedEvent; process.ErrorDataReceived -= OnErrorDataReceivedEvent; } - return process; } ///