Browse Source

Unit Tests window changes: It now has an All Tests root node when multiple test projects exist in a solution. Added a toolbar button and menu item to run all the tests in the solution independent of the currently selected test. Added a run with code coverage toolbar button.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2321 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 19 years ago
parent
commit
47dbaf6529
  1. BIN
      data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.RunAllIcon.png
  2. 1
      data/resources/image/BitmapResources/BitmapResources.res
  3. 17
      src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin
  4. 106
      src/AddIns/Misc/UnitTesting/Src/AllTestsTreeNode.cs
  5. 10
      src/AddIns/Misc/UnitTesting/Src/RunTestCommands.cs
  6. 122
      src/AddIns/Misc/UnitTesting/Src/TestTreeView.cs
  7. 210
      src/AddIns/Misc/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs
  8. 19
      src/AddIns/Misc/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs
  9. 2
      src/AddIns/Misc/UnitTesting/Test/UnitTesting.Tests.csproj
  10. 32
      src/AddIns/Misc/UnitTesting/Test/Utils/DerivedTestProjectTreeNode.cs
  11. 9
      src/AddIns/Misc/UnitTesting/UnitTesting.addin
  12. 1
      src/AddIns/Misc/UnitTesting/UnitTesting.csproj
  13. BIN
      src/Main/StartUp/Project/Resources/BitmapResources.resources

BIN
data/resources/image/BitmapResources/BitmapResources-data/Icons.16x16.RunAllIcon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

1
data/resources/image/BitmapResources/BitmapResources.res

@ -106,6 +106,7 @@ Icons.16x16.FormsDesigner.LockControls = BitmapResources-data\Icons.1 @@ -106,6 +106,7 @@ Icons.16x16.FormsDesigner.LockControls = BitmapResources-data\Icons.1
Icons.16x16.FormsDesigner.DecreaseVerticalSpace = BitmapResources-data\Icons.16x16.FormsDesigner.DecreaseVerticalSpace.png
Icons.16x16.NewFolderIcon = BitmapResources-data\Icons.16x16.NewFolderIcon.png
Icons.16x16.UnderlineText = BitmapResources-data\Icons.16x16.UnderlineText.png
Icons.16x16.RunAllIcon = BitmapResources-data\Icons.16x16.RunAllIcon.png
Icons.16x16.RunProgramIcon = BitmapResources-data\Icons.16x16.RunProgramIcon.png
Icons.16x16.HtmlElements.TableElement = BitmapResources-data\Icons.16x16.HtmlElements.TableElement.png
Icons.16x16.ResourceEditor.obj = BitmapResources-data\Icons.16x16.ResourceEditor.obj.ico

17
src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin

@ -71,6 +71,23 @@ @@ -71,6 +71,23 @@
</ComplexCondition>
</Path>
<Path name = "/SharpDevelop/Pads/UnitTestsPad/Toolbar">
<ComplexCondition action="Disable">
<And>
<Condition name="SolutionOpen"/>
<Not>
<Condition name="RunningTests"/>
</Not>
</And>
<ToolbarItem id = "RunWithCodeCoverage"
insertbefore = "Stop"
insertafter = "Run"
icon = "CodeCoverage.Icons.16x16.Run"
tooltip = "${res:ICSharpCode.UnitTesting.RunWithCoverage}"
class = "ICSharpCode.CodeCoverage.RunTestWithCodeCoverageCommand"/>
</ComplexCondition>
</Path>
<Path path = "/SharpDevelop/BackendBindings/ProjectOptions/AllManaged">
<DialogPanel id = "CodeCoverage"
label = "${res:ICSharpCode.UnitTesting.CodeCoverage}"

106
src/AddIns/Misc/UnitTesting/Src/AllTestsTreeNode.cs

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.Core;
namespace ICSharpCode.UnitTesting
{
/// <summary>
/// All Tests root tree node that is added to the test tree when the
/// solution has multiple test projects.
/// </summary>
public class AllTestsTreeNode : TestTreeNode
{
public AllTestsTreeNode()
: base(null, StringParser.Parse("${res:ICSharpCode.UnitTesting.AllTestsTreeNode.Text}"))
{
}
/// <summary>
/// Raised when the all tests tree node is disposed.
/// </summary>
public event EventHandler Disposed;
/// <summary>
/// Disposes this tree node.
/// </summary>
public override void Dispose()
{
base.Dispose();
if (Disposed != null) {
Disposed(this, new EventArgs());
}
}
/// <summary>
/// Adds a new project node as a child of the All Tests node.
/// </summary>
public void AddProjectNode(TestProjectTreeNode node)
{
node.AddTo(this);
node.ImageIndexChanged += TestProjectTreeNodeImageIndexChanged;
}
/// <summary>
/// Removes the project node.
/// </summary>
public void RemoveProjectNode(TestProjectTreeNode node)
{
if (Nodes.Contains(node)) {
node.ImageIndexChanged -= TestProjectTreeNodeImageIndexChanged;
node.Remove();
}
}
void TestProjectTreeNodeImageIndexChanged(object source, EventArgs e)
{
UpdateImageListIndex();
}
/// <summary>
/// Sets the All Tests image index based on the current image
/// indexes of the child project tree nodes.
/// </summary>
void UpdateImageListIndex()
{
int ignored = 0;
int failed = 0;
int passed = 0;
int notRun = 0;
int total = Nodes.Count;
foreach (TestProjectTreeNode projectNode in Nodes) {
switch (projectNode.ImageIndex) {
case (int)TestTreeViewImageListIndex.TestFailed:
failed++;
break;
case (int)TestTreeViewImageListIndex.TestPassed:
passed++;
break;
case (int)TestTreeViewImageListIndex.TestIgnored:
ignored++;
break;
default: // Not run.
notRun++;
break;
}
}
// Update the image index based on the test project results.
if (failed > 0) {
UpdateImageListIndex(TestResultType.Failure);
} else if (ignored > 0) {
UpdateImageListIndex(TestResultType.Ignored);
} else if (passed > 0 && notRun == 0) {
UpdateImageListIndex(TestResultType.Success);
} else {
UpdateImageListIndex(TestResultType.None);
}
}
}
}

10
src/AddIns/Misc/UnitTesting/Src/RunTestCommands.cs

@ -493,4 +493,14 @@ namespace ICSharpCode.UnitTesting @@ -493,4 +493,14 @@ namespace ICSharpCode.UnitTesting
WorkbenchSingleton.SafeThreadAsyncCall(TestsFinished);
}
}
public class RunAllTestsInPadCommand : RunTestInPadCommand
{
public override void Run()
{
// To make sure all tests are run we set the Owner to null.
Owner = null;
base.Run();
}
}
}

122
src/AddIns/Misc/UnitTesting/Src/TestTreeView.cs

@ -31,9 +31,17 @@ namespace ICSharpCode.UnitTesting @@ -31,9 +31,17 @@ namespace ICSharpCode.UnitTesting
SourceCodeItemSelected = 1
}
/// <summary>
/// The All Tests tree root node that is added if multiple
/// test projects exist in the solution. If the solution contains
/// only one test project then no such node will be added.
/// </summary>
AllTestsTreeNode allTestsNode;
public TestTreeView()
{
ImageList = TestTreeViewImageList.ImageList;
CanClearSelection = false;
}
/// <summary>
@ -77,7 +85,8 @@ namespace ICSharpCode.UnitTesting @@ -77,7 +85,8 @@ namespace ICSharpCode.UnitTesting
/// </summary>
/// <remarks>
/// If the project is already in the tree then it will
/// not be added again.
/// not be added again. If a project is already in the tree then
/// an All Tests root node will be added.
/// </remarks>
public void AddProject(IProject project)
{
@ -88,7 +97,13 @@ namespace ICSharpCode.UnitTesting @@ -88,7 +97,13 @@ namespace ICSharpCode.UnitTesting
if (projectContent != null) {
TestProject testProject = new TestProject(project, projectContent);
TestProjectTreeNode node = new TestProjectTreeNode(testProject);
node.AddTo(this);
if (Nodes.Count == 0) {
node.AddTo(this);
} else {
AllTestsTreeNode allTestsNode = GetAllTestsNode();
allTestsNode.AddProjectNode(node);
}
// Sort the nodes.
SortNodes(Nodes, true);
@ -102,7 +117,14 @@ namespace ICSharpCode.UnitTesting @@ -102,7 +117,14 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public void RemoveProject(IProject project)
{
RemoveProjectNode(GetProjectTreeNode(project));
TestProjectTreeNode projectNode = GetProjectTreeNode(project);
RemoveProjectNode(projectNode);
// Remove the All Tests node if it exists and there
// is only one project tree node left.
if (allTestsNode != null && GetProjectNodes().Count == 1) {
RemoveAllTestsNode();
}
}
/// <summary>
@ -111,7 +133,9 @@ namespace ICSharpCode.UnitTesting @@ -111,7 +133,9 @@ namespace ICSharpCode.UnitTesting
public IProject[] GetProjects()
{
List<IProject> projects = new List<IProject>();
foreach (TestProjectTreeNode projectNode in Nodes) {
// Get the project information.
foreach (TestProjectTreeNode projectNode in GetProjectNodes()) {
projects.Add(projectNode.Project);
}
return projects.ToArray();
@ -211,7 +235,7 @@ namespace ICSharpCode.UnitTesting @@ -211,7 +235,7 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public void UpdateParseInfo(ICompilationUnit oldUnit, ICompilationUnit newUnit)
{
foreach (TestProjectTreeNode projectNode in Nodes) {
foreach (TestProjectTreeNode projectNode in GetProjectNodes()) {
TestProject testProject = projectNode.TestProject;
testProject.UpdateParseInfo(oldUnit, newUnit);
}
@ -223,7 +247,7 @@ namespace ICSharpCode.UnitTesting @@ -223,7 +247,7 @@ namespace ICSharpCode.UnitTesting
/// </summary>
public void ResetTestResults()
{
foreach (TestProjectTreeNode projectNode in Nodes) {
foreach (TestProjectTreeNode projectNode in GetProjectNodes()) {
TestProject testProject = projectNode.TestProject;
testProject.ResetTestResults();
}
@ -277,7 +301,7 @@ namespace ICSharpCode.UnitTesting @@ -277,7 +301,7 @@ namespace ICSharpCode.UnitTesting
/// </summary>
TestProjectTreeNode GetProjectTreeNode(IProject project)
{
foreach (TestProjectTreeNode projectNode in Nodes) {
foreach (TestProjectTreeNode projectNode in GetProjectNodes()) {
if (Object.ReferenceEquals(projectNode.Project, project)) {
return projectNode;
}
@ -285,11 +309,93 @@ namespace ICSharpCode.UnitTesting @@ -285,11 +309,93 @@ namespace ICSharpCode.UnitTesting
return null;
}
/// <summary>
/// Returns the test project tree nodes taking into account
/// if the All Tests root node exists.
/// </summary>
TreeNodeCollection GetProjectNodes()
{
if (allTestsNode != null) {
return allTestsNode.Nodes;
}
return Nodes;
}
/// <summary>
/// Removes the project node from the tree.
/// </summary>
void RemoveProjectNode(TestProjectTreeNode projectNode)
{
if (projectNode != null) {
projectNode.Remove();
if (allTestsNode != null) {
allTestsNode.RemoveProjectNode(projectNode);
} else {
projectNode.Remove();
}
}
}
/// <summary>
/// Gets the All Tests root node which is added if the tree is
/// showing multiple test projects. The All Tests root node will
/// be added if it does not exist.
/// </summary>
AllTestsTreeNode GetAllTestsNode()
{
if (allTestsNode == null) {
AddAllTestsNode();
}
return allTestsNode;
}
/// <summary>
/// Adds a new All Tests root node.
/// </summary>
void AddAllTestsNode()
{
// Save existing nodes (should only be one) before
// clearing so we can add these to the new All Tests node.
TreeNode[] projectNodes = new TreeNode[Nodes.Count];
Nodes.CopyTo(projectNodes, 0);
Nodes.Clear();
allTestsNode = new AllTestsTreeNode();
allTestsNode.Disposed += AllTestsNodeDisposed;
Nodes.Add(allTestsNode);
// Add the original project nodes to the new
// All Tests node.
foreach (TestProjectTreeNode node in projectNodes) {
allTestsNode.AddProjectNode(node);
}
}
/// <summary>
/// Removes the all tests node.
/// </summary>
void RemoveAllTestsNode()
{
// Remove the all tests node.
allTestsNode.Remove();
// Copy project nodes to the root.
foreach (TestTreeNode node in allTestsNode.Nodes) {
Nodes.Add(node);
}
// Dispose the all tests node.
AllTestsNodeDisposed(null, null);
}
/// <summary>
/// Ensures that if the TreeView's Clear method is called
/// directly the test tree does not think there is still
/// an All Tests node.
/// </summary>
void AllTestsNodeDisposed(object source, EventArgs e)
{
allTestsNode.Disposed -= AllTestsNodeDisposed;
allTestsNode = null;
}
}
}

210
src/AddIns/Misc/UnitTesting/Test/Tree/MultipleTestProjectsTestFixture.cs

@ -0,0 +1,210 @@ @@ -0,0 +1,210 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.UnitTesting;
using NUnit.Framework;
using UnitTesting.Tests.Utils;
namespace UnitTesting.Tests.Tree
{
/// <summary>
/// When there are multiple test projects in a solution then the
/// test tree should have an All Tests root node.
/// </summary>
[TestFixture]
public class MultipleTestProjectsTestFixture
{
DummyParserServiceTestTreeView treeView;
MockCSharpProject firstProject;
MockCSharpProject secondProject;
AllTestsTreeNode allTestsTreeNode;
TestProject firstTestProject;
TestProject secondTestProject;
Solution solution;
[SetUp]
public void SetUp()
{
treeView = new DummyParserServiceTestTreeView();
// Create a solution with two test projects.
solution = new Solution();
// Create the first test project.
firstProject = new MockCSharpProject(solution);
firstProject.Name = "FirstTestProject";
ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(firstProject);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(firstProject, nunitFrameworkReferenceItem);
// Create the second test project.
secondProject = new MockCSharpProject(solution);
secondProject.Name = "SecondTestProject";
nunitFrameworkReferenceItem = new ReferenceProjectItem(secondProject);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(secondProject, nunitFrameworkReferenceItem);
// Add the projects to the solution.
solution.Folders.Add(firstProject);
solution.Folders.Add(secondProject);
// Create a dummy project content so the projects will be added
// to the tree.
treeView.ProjectContentForProject = new MockProjectContent();
// Add the solution to the tree.
treeView.AddSolution(solution);
allTestsTreeNode = treeView.Nodes[0] as AllTestsTreeNode;
firstTestProject = treeView.GetTestProject(firstProject);
secondTestProject = treeView.GetTestProject(secondProject);
}
[TearDown]
public void TearDown()
{
treeView.Dispose();
}
[Test]
public void OneAllTestsRootNode()
{
Assert.AreEqual(1, treeView.Nodes.Count);
}
[Test]
public void RootNodeIsAllTestsNode()
{
Assert.IsNotNull(allTestsTreeNode);
}
[Test]
public void AllTestsNodeText()
{
Assert.AreEqual(StringParser.Parse("${res:ICSharpCode.UnitTesting.AllTestsTreeNode.Text}"), treeView.Nodes[0].Text);
}
[Test]
public void GetProjectsAfterClear()
{
treeView.Clear();
Assert.AreEqual(0, treeView.GetProjects().Length);
}
/// <summary>
/// Tests that the All Tests node is removed when only one
/// project remains.
/// </summary>
[Test]
public void ProjectRemoved()
{
treeView.RemoveProject(firstProject);
Assert.AreEqual(1, treeView.GetProjects().Length);
Assert.IsInstanceOfType(typeof(TestProjectTreeNode), treeView.Nodes[0]);
}
/// <summary>
/// Tests that the all test node has the correct image index.
/// </summary>
[Test]
public void ProjectIgnoredTestResult()
{
TestClass c = new TestClass(new MockClass("Tests.TestFixture"));
firstTestProject.TestClasses.Add(c);
c.Result = TestResultType.Ignored;
Assert.AreEqual((int)TestTreeViewImageListIndex.TestIgnored, allTestsTreeNode.ImageIndex);
}
/// <summary>
/// Tests that a removed project does not affect the image index of the
/// All Tests root node.
/// </summary>
[Test]
public void IgnoredTestResultAfterProjectRemoved()
{
// Add an extra project so when we remove one the All Tests node
// is not removed.
MockCSharpProject project = new MockCSharpProject(solution);
project.Name = "ThirdTestProject";
ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
// Add the project into a dummy project node.
TestProject testProject = new TestProject(project, new MockProjectContent());
DerivedTestProjectTreeNode projectNode = new DerivedTestProjectTreeNode(testProject);
allTestsTreeNode.AddProjectNode(projectNode);
// Remove an existing project.
treeView.RemoveProject(project);
// Modify the image index for the removed tree node.
projectNode.CallUpdateImageListIndex(TestResultType.Ignored);
// Image index of the all tests node should be unchanged.
Assert.AreEqual((int)TestTreeViewImageListIndex.TestNotRun, allTestsTreeNode.ImageIndex);
}
[Test]
public void ProjectFailedTestResult()
{
TestClass c = new TestClass(new MockClass("Tests.TestFixture"));
firstTestProject.TestClasses.Add(c);
c.Result = TestResultType.Failure;
Assert.AreEqual((int)TestTreeViewImageListIndex.TestFailed, allTestsTreeNode.ImageIndex);
}
[Test]
public void ProjectPassedTestResult()
{
TestClass c = new TestClass(new MockClass("Tests.TestFixture"));
firstTestProject.TestClasses.Add(c);
c.Result = TestResultType.Success;
Assert.AreEqual((int)TestTreeViewImageListIndex.TestNotRun, allTestsTreeNode.ImageIndex);
}
[Test]
public void AllTestsNodeImageIndexReset()
{
// Make one of the test projects pass so the all tests
// node's image index is changed.
ProjectPassedTestResult();
// Set the test class result back to not run.
firstTestProject.TestClasses[0].Result = TestResultType.None;
Assert.AreEqual((int)TestTreeViewImageListIndex.TestNotRun, allTestsTreeNode.ImageIndex);
}
[Test]
public void AllTestProjectsPassed()
{
TestClass c = new TestClass(new MockClass("Tests.TestFixture"));
firstTestProject.TestClasses.Add(c);
c.Result = TestResultType.Success;
c = new TestClass(new MockClass("Tests.TestFixture"));
secondTestProject.TestClasses.Add(c);
c.Result = TestResultType.Success;
Assert.AreEqual((int)TestTreeViewImageListIndex.TestPassed, allTestsTreeNode.ImageIndex);
}
[Test]
public void CanClearSelection()
{
Assert.IsFalse(treeView.CanClearSelection);
}
}
}

19
src/AddIns/Misc/UnitTesting/Test/Tree/SolutionOpenedTestFixture.cs

@ -81,6 +81,10 @@ namespace UnitTesting.Tests.Tree @@ -81,6 +81,10 @@ namespace UnitTesting.Tests.Tree
Assert.AreEqual(0, pad.TestTreeView.Nodes.Count);
}
/// <summary>
/// Add a new project and check that we also add an All Tests
/// root node and a new project node.
/// </summary>
[Test]
public void ProjectAdded()
{
@ -92,7 +96,10 @@ namespace UnitTesting.Tests.Tree @@ -92,7 +96,10 @@ namespace UnitTesting.Tests.Tree
pad.CallProjectAdded(project);
Assert.AreEqual(2, pad.TestTreeView.Nodes.Count);
Assert.AreEqual(2, pad.TestTreeView.GetProjects().Length);
Assert.AreEqual(1, pad.TestTreeView.Nodes.Count);
Assert.IsInstanceOfType(typeof(AllTestsTreeNode), pad.TestTreeView.Nodes[0]);
Assert.AreEqual(2, pad.TestTreeView.Nodes[0].Nodes.Count);
}
[Test]
@ -125,7 +132,10 @@ namespace UnitTesting.Tests.Tree @@ -125,7 +132,10 @@ namespace UnitTesting.Tests.Tree
// Project should be added since it has a reference to
// NUnit.
Assert.AreEqual(2, pad.TestTreeView.Nodes.Count);
Assert.AreEqual(2, pad.TestTreeView.GetProjects().Length);
Assert.AreEqual(1, pad.TestTreeView.Nodes.Count);
Assert.IsInstanceOfType(typeof(AllTestsTreeNode), pad.TestTreeView.Nodes[0]);
Assert.AreEqual(2, pad.TestTreeView.Nodes[0].Nodes.Count);
}
[Test]
@ -146,7 +156,10 @@ namespace UnitTesting.Tests.Tree @@ -146,7 +156,10 @@ namespace UnitTesting.Tests.Tree
pad.CallProjectItemAdded(refProjectItem);
Assert.AreEqual(2, pad.TestTreeView.Nodes.Count);
Assert.AreEqual(2, pad.TestTreeView.GetProjects().Length);
Assert.AreEqual(1, pad.TestTreeView.Nodes.Count);
Assert.IsInstanceOfType(typeof(AllTestsTreeNode), pad.TestTreeView.Nodes[0]);
Assert.AreEqual(2, pad.TestTreeView.Nodes[0].Nodes.Count);
}
[Test]

2
src/AddIns/Misc/UnitTesting/Test/UnitTesting.Tests.csproj

@ -57,9 +57,11 @@ @@ -57,9 +57,11 @@
<Compile Include="AssemblyInfo.cs" />
<Compile Include="NamespaceFilterTests.cs" />
<Compile Include="TestableConditionTests.cs" />
<Compile Include="Tree\MultipleTestProjectsTestFixture.cs" />
<Compile Include="Tree\TreeNodeContextMenuTestFixture.cs" />
<Compile Include="Tree\TreeNodeSortingTestFixture.cs" />
<Compile Include="Tree\OpenUnitTestsPadWithSolutionOpenTestFixture.cs" />
<Compile Include="Utils\DerivedTestProjectTreeNode.cs" />
<Compile Include="Utils\DerivedTestTreeView.cs" />
<Compile Include="Utils\DerivedUnitTestsPad.cs" />
<Compile Include="Utils\MockTestCase.cs" />

32
src/AddIns/Misc/UnitTesting/Test/Utils/DerivedTestProjectTreeNode.cs

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.UnitTesting;
namespace UnitTesting.Tests.Utils
{
/// <summary>
/// Derived version of the TestProjectTreeNode class that
/// allows us to call the UpdateImageListIndex method directly.
/// </summary>
public class DerivedTestProjectTreeNode : TestProjectTreeNode
{
public DerivedTestProjectTreeNode(TestProject testProject)
: base(testProject)
{
}
/// <summary>
/// Calls the base class's UpdateImageListIndex method.
/// </summary>
public void CallUpdateImageListIndex(TestResultType result)
{
base.UpdateImageListIndex(result);
}
}
}

9
src/AddIns/Misc/UnitTesting/UnitTesting.addin

@ -94,7 +94,12 @@ @@ -94,7 +94,12 @@
<Condition name="RunningTests"/>
</Not>
</And>
<ToolbarItem id = "RunAll"
icon = "Icons.16x16.RunAllIcon"
tooltip = "${res:NUnitPad.NUnitPadContent.RunAllTests}"
class = "ICSharpCode.UnitTesting.RunAllTestsInPadCommand"/>
<ToolbarItem id = "Run"
insertafter="RunAll"
icon = "Icons.16x16.RunProgramIcon"
tooltip = "${res:NUnitPad.NUnitPadContent.RunItem}"
class = "ICSharpCode.UnitTesting.RunTestInPadCommand"/>
@ -126,6 +131,10 @@ @@ -126,6 +131,10 @@
<Condition name="RunningTests"/>
</Not>
</And>
<MenuItem id = "RunAll"
icon = "Icons.16x16.RunAllIcon"
label = "${res:NUnitPad.NUnitPadContent.RunAllTests}"
class = "ICSharpCode.UnitTesting.RunAllTestsInPadCommand"/>
<MenuItem id = "Run"
icon = "Icons.16x16.RunProgramIcon"
label = "${res:NUnitPad.NUnitPadContent.RunTestsContextMenuLabel}"

1
src/AddIns/Misc/UnitTesting/UnitTesting.csproj

@ -57,6 +57,7 @@ @@ -57,6 +57,7 @@
<None Include="UnitTesting.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Compile Include="Src\AllTestsTreeNode.cs" />
<Compile Include="Src\UnitTestCommands.cs" />
<Compile Include="Src\TestableCondition.cs" />
<Compile Include="Src\RunningTestsCondition.cs" />

BIN
src/Main/StartUp/Project/Resources/BitmapResources.resources

Binary file not shown.
Loading…
Cancel
Save