Percentage 除以自己是否应该等于 100% 而不是 0.001%
SeWZC opened this issue · 0 comments
SeWZC commented
测试代码:
"非零百分比除以自己等于 100%".Test(() =>
{
var percentage = Percentage.FromDouble(new Random().NextDouble());
Assert.AreEqual(Percentage.FromDouble(1).DoubleValue.ToString("P"), (percentage / percentage).DoubleValue.ToString("P"));
});
测试结果:Assert.AreEqual failed. Expected:<100.00%>. Actual:<0.00%>.