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 String
private static String
static AssertionError
comparisonFailure
(String message, Object expected, Object actual) Creates a new instance of JUnit'sComparisonFailure
only if JUnit 4+ is in the classpath.(package private) static void
constructorInvoker
(ConstructorInvoker newConstructorInvoker) private static String
private static AssertionError
newComparisonFailure
(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'sComparisonFailure
only 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
, ornull
if 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
-