This commit is contained in:
@@ -36,7 +36,20 @@ namespace BritishHorseRacingApi.Tests
|
||||
}
|
||||
|
||||
[Theory()]
|
||||
[InlineData("1m 1f 104y", 2084)]
|
||||
[InlineData("1m 15.39s(+0.34s)", 340)]
|
||||
[InlineData(null, null)]
|
||||
[InlineData(" ", null)]
|
||||
public void TestStopwatchStringDifferenceToMilliseconds(string time, double? expectedValue)
|
||||
{
|
||||
//Arrange
|
||||
//Act
|
||||
var totalMilliseconds = DataConverterHelper.StopwatchStringDifferenceToMilliseconds(time);
|
||||
//Assert
|
||||
Assert.Equal(totalMilliseconds, expectedValue);
|
||||
}
|
||||
|
||||
[Theory()]
|
||||
[InlineData("1m 1f 104y ", 2084)]
|
||||
[InlineData("1f 104y", 324)]
|
||||
[InlineData("104y", 104)]
|
||||
[InlineData("", null)]
|
||||
|
||||
Reference in New Issue
Block a user