Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit d238d28

Browse files
ddurmrward
authored andcommitted
Prevent test case failure showing test as passed.
When using test data source, where some data fails, following item that is successful, overwrites "red" status to "green" again in the Unit Tests window. This is a workaround. Ideally SharpDevelop would have proper support for test cases, such as showing them in the Unit Tests window and being able to run individual test cases. Fixes #726
1 parent 28cac2a commit d238d28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/AddIns/Analysis/UnitTesting/Model/TestBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ protected set {
6565
void ChangeResult(TestResultType newResult)
6666
{
6767
TestResultType oldResult = result;
68+
if (oldResult == TestResultType.Failure && newResult == TestResultType.Success) {
69+
return; // do not revert result from failure to success (Test with data source)
70+
}
6871
if (oldResult != newResult) {
6972
result = newResult;
7073
OnResultChanged(new TestResultTypeChangedEventArgs(oldResult, newResult));

0 commit comments

Comments
 (0)