Add decimal odds
SuccessfulCode/BritishHorseRacingApi/master There was a failure building this commit
SuccessfulCode/BritishHorseRacingApi/master There was a failure building this commit
This commit is contained in:
@@ -63,5 +63,19 @@ namespace BritishHorseRacingApi.Tests
|
||||
//Assert
|
||||
Assert.Equal(expectedResult, result);
|
||||
}
|
||||
|
||||
[Theory()]
|
||||
[InlineData("3/5",1.6)]
|
||||
[InlineData("", null)]
|
||||
[InlineData(" ", null)]
|
||||
[InlineData(null, null)]
|
||||
public void TestFractionOddsToDecimal(string value, double? expectedResult)
|
||||
{
|
||||
//Arrange
|
||||
//Act
|
||||
var result = DataConverterHelper.FractionOddsToDecimal(value);
|
||||
//Assert
|
||||
Assert.Equal(expectedResult, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user