Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Update NUnitAppAction.cs
Browse files Browse the repository at this point in the history
Fixed #8
  • Loading branch information
stevedennis committed Mar 13, 2014
1 parent b1d4ac5 commit d5a027e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion NUnitAppAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ protected override void RunTests()
bool nodeResult = node.Attributes["success"].Value.Equals("True", StringComparison.OrdinalIgnoreCase) ||
(!this.TreatInconclusiveAsFailure && node.Attributes["result"].Value.Equals("inconclusive", StringComparison.OrdinalIgnoreCase));

double testLength = double.Parse(node.Attributes["time"].Value);
var numberStyles = NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.AllowLeadingSign |NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands | NumberStyles.AllowExponent;
double testLength = 0;
if (!double.TryParse(node.Attributes["time"].Value, numberStyles, CultureInfo.InvariantCulture, out testLength))
{
this.LogWarning("Error parsing " + node.Attributes["time"].Value + " as a number.");
};

this.LogInformation(string.Format("NUnit Test: {0}, Result: {1}, Test Length: {2} secs",
testName,
Expand Down

0 comments on commit d5a027e

Please sign in to comment.