org.fest.assertions.error
Class ShouldBeEqualWithinOffset

java.lang.Object
  extended by org.fest.assertions.error.BasicErrorMessageFactory
      extended by org.fest.assertions.error.ShouldBeEqualWithinOffset
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldBeEqualWithinOffset
extends BasicErrorMessageFactory

Creates an error message indicating that an assertion that verifies that two numbers are equal within a positive offset failed.

Author:
Alex Ruiz

Method Summary
static
<T extends Number>
ErrorMessageFactory
shouldBeEqual(T actual, T expected, Offset<T> offset)
          Creates a new ShouldBeEqualWithinOffset.
static
<T extends Number>
ErrorMessageFactory
shouldBeEqual(T actual, T expected, Offset<T> offset, org.fest.util.ComparisonStrategy comparisonStrategy)
          Creates a new ShouldBeEqualWithinOffset.
 
Methods inherited from class org.fest.assertions.error.BasicErrorMessageFactory
create, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

shouldBeEqual

public static <T extends Number> ErrorMessageFactory shouldBeEqual(T actual,
                                                                   T expected,
                                                                   Offset<T> offset)
Creates a new ShouldBeEqualWithinOffset.

Type Parameters:
T - guarantees that the values used in this factory have the same type.
Parameters:
actual - the actual value in the failed assertion.
expected - the expected value in the failed assertion.
offset - the given positive offset.
Returns:
the created ErrorMessageFactory.

shouldBeEqual

public static <T extends Number> ErrorMessageFactory shouldBeEqual(T actual,
                                                                   T expected,
                                                                   Offset<T> offset,
                                                                   org.fest.util.ComparisonStrategy comparisonStrategy)
Creates a new ShouldBeEqualWithinOffset.

Type Parameters:
T - guarantees that the values used in this factory have the same type.
Parameters:
actual - the actual value in the failed assertion.
expected - the expected value in the failed assertion.
offset - the given positive offset.
comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
Returns:
the created ErrorMessageFactory.


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.