Package org.mockito.internal.junit
Class ExceptionFactory
java.lang.Object
org.mockito.internal.junit.ExceptionFactory
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AssertionError
createArgumentsAreDifferentException
(String message, String wanted, String actual) Returns an AssertionError that describes the fact that the arguments of an invocation are different.
-
Field Details
-
factory
-
-
Constructor Details
-
ExceptionFactory
private ExceptionFactory()
-
-
Method Details
-
createArgumentsAreDifferentException
public static AssertionError createArgumentsAreDifferentException(String message, String wanted, String actual) Returns an AssertionError that describes the fact that the arguments of an invocation are different. IfAssertionFailedError
is on the class path (used by JUnit 5 and others), it returns a class that extends it. Otherwise, ifComparisonFailure
is on the class path (shipped with JUnit 4), it will return a class that extends that. This provides better IDE support as the comparison result can be opened in a visual diff. If neither are available, it returns an instance ofArgumentsAreDifferent
.
-