Skip to content

Commit

Permalink
Fix final condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Dec 11, 2024
1 parent 234c68f commit af35624
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Adapter/MSTest.TestAdapter/Discovery/AssemblyEnumerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,20 +384,24 @@ private static bool TryUnfoldITestDataSources(UnitTestElement test, TestMethodIn
}
}

if (tempListOfTests.Count > 0)
{
tests.AddRange(tempListOfTests);
}

return isDataDriven;
}
catch (Exception ex)
{
string message = string.Format(CultureInfo.CurrentCulture, Resource.CannotEnumerateIDataSourceAttribute, test.TestMethod.ManagedTypeName, test.TestMethod.ManagedMethodName, ex);
PlatformServiceProvider.Instance.AdapterTraceLogger.LogInfo($"DynamicDataEnumerator: {message}");
return false;
}
finally
{

if (tempListOfTests.Count > 0)
{
tests.AddRange(tempListOfTests);
}

return false;
}
}

Expand Down

0 comments on commit af35624

Please sign in to comment.