Verifies that an actual value does not approximately equal some unexpected value
to within a specified delta.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)
Syntax
| C# |
|---|
public static void AreNotApproximatelyEqual<TValue, TDifference>( TValue unexpectedValue, TValue actualValue, TDifference delta ) |
| Visual Basic (Declaration) |
|---|
Public Shared Sub AreNotApproximatelyEqual(Of TValue, TDifference) ( _ unexpectedValue As TValue, _ actualValue As TValue, _ delta As TDifference _ ) |
Parameters
- unexpectedValue
- Type: TValue
The expected value.
- actualValue
- Type: TValue
The actual value.
- delta
- Type: TDifference
The inclusive delta between the values.
Type Parameters
- TValue
- The type of values to be compared.
- TDifference
- The type of the difference produced when the values are subtracted, for numeric types this is the same as TValue but it may differ for other types.
Remarks
The values are considered approximately equal if the absolute value of their difference is less than or equal to the delta.
This method works with any comparable type that also supports a subtraction operator including Single, Double, Decimal, Int32, DateTime (using a TimeSpan delta), and many others.
Exceptions
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionException | Thrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise. |
