Browse Source

Fixed SD2-678. Unit testing pad's stop toolbar button is now disabled after a test run has finished.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1099 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
375720d358
  1. 7
      src/AddIns/Misc/UnitTesting/Src/TestTreeView.cs

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

@ -25,6 +25,7 @@ namespace ICSharpCode.UnitTesting @@ -25,6 +25,7 @@ namespace ICSharpCode.UnitTesting
{
TestLoader loader = new TestLoader();
static MessageViewCategory testRunnerCategory;
bool runningTests;
[Flags]
public enum TestTreeViewState {
@ -87,6 +88,9 @@ namespace ICSharpCode.UnitTesting @@ -87,6 +88,9 @@ namespace ICSharpCode.UnitTesting
// This method interceps StdOut/StdErr from the tests
TestRunnerCategory.AppendText(e.TestOutput.Text);
};
loader.Events.RunFinished += delegate(object sender, TestEventArgs e) {
runningTests = false;
};
loader.Events.TestFinished += delegate(object sender, TestEventArgs e) {
TestResult result = e.Result;
if (!result.IsSuccess) {
@ -174,7 +178,7 @@ namespace ICSharpCode.UnitTesting @@ -174,7 +178,7 @@ namespace ICSharpCode.UnitTesting
public bool IsTestRunning {
get {
return loader.IsTestRunning;
return runningTests;
}
}
@ -308,6 +312,7 @@ namespace ICSharpCode.UnitTesting @@ -308,6 +312,7 @@ namespace ICSharpCode.UnitTesting
public new void RunTests()
{
if (Nodes.Count > 0) {
runningTests = true;
base.RunTests();
}
}

Loading…
Cancel
Save