Description
ToleranceBasedEqualsAssertion exists for double, float, decimal, DateTime, etc., but only supports absolute tolerance. Missing:
- Relative tolerance (e.g., "within 5% of expected value")
- Significant digits for decimal
- Combined absolute + relative tolerance
Why
Financial calculations and scientific applications need different tolerance semantics. Relative tolerance is critical for comparing very large or very small numbers.
Suggested Approach
Extend with overloads like:
.WithinRelativeTolerance(double percentTolerance)
.WithinSignificantDigits(int digits)
Description
ToleranceBasedEqualsAssertionexists fordouble,float,decimal,DateTime, etc., but only supports absolute tolerance. Missing:Why
Financial calculations and scientific applications need different tolerance semantics. Relative tolerance is critical for comparing very large or very small numbers.
Suggested Approach
Extend with overloads like: