Skip to content

Commit

Permalink
Update TestRunner class.
Browse files Browse the repository at this point in the history
Simplify the class by change interface of Run method in the class.
  • Loading branch information
CountrySideEngineer committed May 12, 2023
1 parent 0d5f7d4 commit cb2637b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ public virtual void Run(string path, TestInformation information)
/// <param name="path">Path to file.</param>
/// <param name="testItem">Test information.</param>
/// <returns>Test running process.</returns>
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();
Expand All @@ -127,7 +124,6 @@ protected virtual Process Run(string path, TestItem testItem)
process.OutputDataReceived -= OnOutputDataReceivedEvent;
process.ErrorDataReceived -= OnErrorDataReceivedEvent;
}
return process;
}

/// <summary>
Expand Down

0 comments on commit cb2637b

Please sign in to comment.