Package org.mockito.internal.junit
Class ExceptionFactory
- java.lang.Object
-
- org.mockito.internal.junit.ExceptionFactory
-
public class ExceptionFactory extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
ExceptionFactory.ExceptionFactoryImpl
-
Field Summary
Fields Modifier and Type Field Description private static ExceptionFactory.ExceptionFactoryImpl
factory
-
Constructor Summary
Constructors Modifier Constructor Description private
ExceptionFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.AssertionError
createArgumentsAreDifferentException(java.lang.String message, java.lang.String wanted, java.lang.String actual)
Returns an AssertionError that describes the fact that the arguments of an invocation are different.
-
-
-
Field Detail
-
factory
private static final ExceptionFactory.ExceptionFactoryImpl factory
-
-
Method Detail
-
createArgumentsAreDifferentException
public static java.lang.AssertionError createArgumentsAreDifferentException(java.lang.String message, java.lang.String wanted, java.lang.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 3 and 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
.
-
-