|
|
|
@ -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(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|