【发布时间】:2013-06-07 22:10:51
【问题描述】:
我有两个双精度数组。有没有办法使用 FluentAssertions 使用 .BeApproximately() 技术逐个元素地比较数组?
一个范围值足以满足整个数组的需求。
例子:
double[] source = { 10.01, 8.01, 6.01 };
double[] target = { 10.0, 8.0, 6.0 };
// THE FOLLOWING IS NOT IMPLEMENTED
target.Should().BeApproximately(source, 0.01);
有其他方法吗?
【问题讨论】:
标签: c# unit-testing nunit fluent-assertions