This commit is contained in:
@@ -65,17 +65,19 @@ namespace BritishHorseRacingApi.Tests
|
||||
}
|
||||
|
||||
[Theory()]
|
||||
[InlineData("3/5",1.6)]
|
||||
[InlineData("3/5", 1.6)]
|
||||
[InlineData("20/1",21)]
|
||||
[InlineData("", null)]
|
||||
[InlineData(" ", null)]
|
||||
[InlineData(null, null)]
|
||||
public void TestFractionOddsToDecimal(string value, decimal? expectedResult)
|
||||
public void TestFractionOddsToDecimal(string value, double? expectedResult)
|
||||
{
|
||||
//Arrange
|
||||
var decimalExpectedValue = (decimal?)expectedResult;
|
||||
//Act
|
||||
var result = DataConverterHelper.FractionOddsToDecimal(value);
|
||||
//Assert
|
||||
Assert.Equal(expectedResult, result);
|
||||
Assert.Equal(decimalExpectedValue, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user