-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
130 additions
and
7 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions
33
dev/src/gtest_gui/gtest_gui/Command/Argument/SingleSelectedTestCommandArgument.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using gtest_gui.Model; | ||
using gtest2html; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace gtest_gui.Command.Argument | ||
{ | ||
public class SingleSelectedTestCommandArgument : TestCommandArgument | ||
{ | ||
/// <summary> | ||
/// Default constructor. | ||
/// </summary> | ||
public SingleSelectedTestCommandArgument() : base() { } | ||
|
||
/// <summary> | ||
/// Constructor with TestInformation object. | ||
/// </summary> | ||
/// <param name="testInfo">Test information.</param> | ||
public SingleSelectedTestCommandArgument(TestInformation testInfo) : base(testInfo) { } | ||
|
||
/// <summary> | ||
/// Constructor with TestCase data. | ||
/// </summary> | ||
/// <param name="testCase"></param> | ||
public SingleSelectedTestCommandArgument(TestCase testCase) : base(testCase) { } | ||
|
||
/// <summary> | ||
/// Test item id value. | ||
/// </summary> | ||
public int TestItemId { get; set; } | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
dev/src/gtest_gui/gtest_gui/Command/SingleTestExecuteCommand.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using gtest_gui.Command.Argument; | ||
using gtest_gui.Model; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace gtest_gui.Command | ||
{ | ||
public class SingleTestExecuteCommand : TestExecuteCommand | ||
{ | ||
public override object ExecuteCommand(TestCommandArgument cmdArgument) | ||
{ | ||
SingleSelectedTestCommandArgument arg = (SingleSelectedTestCommandArgument)cmdArgument; | ||
TestInformation testInfo = new TestInformation(arg.TestInfo); | ||
foreach (var item in testInfo.TestItems) | ||
{ | ||
item.IsSelected = false; | ||
} | ||
testInfo.TestItems.ElementAt(arg.TestItemId).IsSelected = true; | ||
TestCommandArgument cmdArg = new TestCommandArgument(testInfo); | ||
|
||
return base.ExecuteCommand(cmdArg); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters