ICSharpCode.SharpUnit an Unit Testing Framework for .NET

Assertion.AssertEquals Method (Double, Double, Double)

Asserts that two doubles are equal concerning a delta. If the expected value is infinity then the delta value is ignored.

public static void AssertEquals(
   double expected,
   double current,
   double delta
);

Parameters

expected
The expected value
current
The current value
delta
The maximum acceptable difference between the the expected and the current

Exceptions

Exception TypeCondition
AssertionFailedException thrown if |excepted - current| > delta

See Also

Assertion Class | Assertion Members | ICSharpCode.SharpUnit Namespace | Assertion.AssertEquals Overload List