Skip to content

Commit

Permalink
Add comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
CountrySideEngineer committed May 12, 2023
1 parent cb2637b commit ca9f67f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
24 changes: 21 additions & 3 deletions dev/src/gtest_gui/gtest_gui/Command/TestExecuteAsyncCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,35 @@ namespace gtest_gui.Command
{
public class TestExecuteAsyncCommand : TestExecuteCommand
{
/// <summary>
/// Run test async.
/// </summary>
protected TestRunnerAsync _runnerAsync;

/// <summary>
/// Content window class.
/// </summary>
protected CountrySideEngineer.ContentWindow.ContentWindow _contentWindow;

protected CountrySideEngineer.ProgressWindow.ProgressWindow _proressWindow;
/// <summary>
/// Progress window class.
/// </summary>
protected ProgressWindow _proressWindow;

/// <summary>
/// Default constructor.
/// </summary>
public TestExecuteAsyncCommand() : base()
{
_runnerAsync = new TestRunnerAsync();
_contentWindow = new CountrySideEngineer.ContentWindow.ContentWindow();
_proressWindow = new CountrySideEngineer.ProgressWindow.ProgressWindow();
}

/// <summary>
/// Constructor with argument.
/// </summary>
/// <param name="runner"></param>
public TestExecuteAsyncCommand(TestRunner runner) : base(runner)
{
_runnerAsync = new TestRunnerAsync();
Expand All @@ -47,8 +63,7 @@ public override object ExecuteCommand(TestCommandArgument cmdArgument)
{
SetUpTestRunner(cmdArgument);

string testFileName = System.IO.Path.GetFileNameWithoutExtension(cmdArgument.TestInfo.TestFile);
_contentWindow.ViewTitle = testFileName;
_contentWindow.ViewTitle = System.IO.Path.GetFileNameWithoutExtension(cmdArgument.TestInfo.TestFile);
_contentWindow.Start();

_proressWindow.Start(_runnerAsync);
Expand Down Expand Up @@ -99,6 +114,9 @@ protected override void SetUpTestRunner(TestCommandArgument cmdArg)
_runnerAsync.TestInfo = cmdArg.TestInfo;
}

/// <summary>
/// Teardown the test.
/// </summary>
protected override void TearDownTestRunner()
{
base.TearDownTestRunner();
Expand Down
3 changes: 3 additions & 0 deletions dev/src/gtest_gui/gtest_gui/Command/TestExecuteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ protected virtual void SetUpTestRunner(TestCommandArgument cmdArg)
}
}

/// <summary>
/// Tear down the test.
/// </summary>
protected virtual void TearDownTestRunner()
{
_runner.TestDataReceivedEventHandler -= _logBuilder.OnDataReceived;
Expand Down

0 comments on commit ca9f67f

Please sign in to comment.