Package org.fest.assertions
Class ComparisonFailureFactory
java.lang.Object
org.fest.assertions.ComparisonFailureFactory
Understands creation of JUnit's
ComparisonFailure.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringprivate static Stringstatic AssertionErrorcomparisonFailure(String message, Object expected, Object actual) Creates a new instance of JUnit'sComparisonFailureonly if JUnit 4+ is in the classpath.(package private) static voidconstructorInvoker(ConstructorInvoker newConstructorInvoker) private static Stringprivate static AssertionErrornewComparisonFailure(String message, Object expected, Object actual)
-
Field Details
-
EMPTY_MESSAGE
- See Also:
-
constructorInvoker
-
-
Constructor Details
-
ComparisonFailureFactory
private ComparisonFailureFactory()
-
-
Method Details
-
constructorInvoker
-
comparisonFailure
Creates a new instance of JUnit'sComparisonFailureonly if JUnit 4+ is in the classpath.- Parameters:
message- the identifying message ornull.expected- the expected value.actual- the actual value.- Returns:
- the created
ComparisonFailure, ornullif JUnit 4+ is not in the classpath.
-
clean
-
newComparisonFailure
private static AssertionError newComparisonFailure(String message, Object expected, Object actual) throws Exception - Throws:
Exception
-
asString
-
format
-