ICSharpCode.SharpUnit an Unit Testing Framework for .NET

Assertion.AssertEquals Method (String, Single, Single, Single)

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

public static void AssertEquals(
   string message,
   float expected,
   float current,
   float delta
);

Parameters

message
The message to display if the two objects aren't equal.
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