Skip to content

Commit

Permalink
Fix set the duration of TestResults.
Browse files Browse the repository at this point in the history
  • Loading branch information
xkbeyer committed Sep 29, 2018
1 parent d3f886c commit 0620441
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions TestAdapter/TestExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,15 @@ private int ConstructResult(Tests.Expression[] Expresions, TestResult testResult

private void CreateResult(Tests.TestCase element, TestResult testResult, TestCase testCase, string name)
{
var subResult = new TestResult(testCase);
subResult.Outcome = testResult.Outcome;
subResult.DisplayName = testCase.DisplayName;
subResult.ErrorMessage = $"{element.Name}{Environment.NewLine}";
subResult.ErrorStackTrace = "";


var subResult = new TestResult(testCase)
{
Outcome = testResult.Outcome,
DisplayName = testCase.DisplayName,
ErrorMessage = $"{element.Name}{Environment.NewLine}",
ErrorStackTrace = "",
Duration = testResult.Duration
};

int i = ConstructResult(element.Expressions, subResult);

foreach (var s in (element.Warning ?? new string[] { }))
Expand Down

0 comments on commit 0620441

Please sign in to comment.