public class Reporter
extends java.lang.Object
One of the key points of mocking library is proper verification/exception messages. All messages in one place makes it easier to tune and amend them.
Reporter can be injected and therefore is easily testable.
Generally, exception messages are full of line breaks to make them easy to read (xunit plugins take only fraction of screen on modern IDEs).
Constructor and Description |
---|
Reporter() |
public void checkedExceptionInvalid(java.lang.Throwable t)
public void cannotStubWithNullThrowable()
public void unfinishedStubbing(Location location)
public void incorrectUseOfApi()
public void missingMethodInvocation()
public void unfinishedVerificationException(Location location)
public void notAMockPassedToVerify(java.lang.Class type)
public void nullPassedToVerify()
public void notAMockPassedToWhenMethod()
public void nullPassedToWhenMethod()
public void mocksHaveToBePassedToVerifyNoMoreInteractions()
public void notAMockPassedToVerifyNoMoreInteractions()
public void nullPassedToVerifyNoMoreInteractions()
public void notAMockPassedWhenCreatingInOrder()
public void nullPassedWhenCreatingInOrder()
public void mocksHaveToBePassedWhenCreatingInOrder()
public void inOrderRequiresFamiliarMock()
public void invalidUseOfMatchers(int expectedMatchersCount, int recordedMatchersCount)
public void argumentsAreDifferent(java.lang.String wanted, java.lang.String actual, Location actualLocation)
public void wantedButNotInvoked(PrintableInvocation wanted)
public void wantedButNotInvoked(PrintableInvocation wanted, java.util.List<? extends PrintableInvocation> invocations)
public void wantedButNotInvokedInOrder(PrintableInvocation wanted, PrintableInvocation previous)
public void tooManyActualInvocations(int wantedCount, int actualCount, PrintableInvocation wanted, Location firstUndesired)
public void neverWantedButInvoked(PrintableInvocation wanted, Location firstUndesired)
public void tooManyActualInvocationsInOrder(int wantedCount, int actualCount, PrintableInvocation wanted, Location firstUndesired)
public void tooLittleActualInvocations(Discrepancy discrepancy, PrintableInvocation wanted, Location lastActualLocation)
public void tooLittleActualInvocationsInOrder(Discrepancy discrepancy, PrintableInvocation wanted, Location lastActualLocation)
public void noMoreInteractionsWanted(Invocation undesired, java.util.List<VerificationAwareInvocation> invocations)
public void noMoreInteractionsWantedInOrder(Invocation undesired)
public void cannotMockFinalClass(java.lang.Class<?> clazz)
public void cannotStubVoidMethodWithAReturnValue(java.lang.String methodName)
public void onlyVoidMethodsCanBeSetToDoNothing()
public void wrongTypeOfReturnValue(java.lang.String expectedType, java.lang.String actualType, java.lang.String methodName)
public void wantedAtMostX(int maxNumberOfInvocations, int foundSize)
public void misplacedArgumentMatcher(Location location)
public void smartNullPointerException(java.lang.String invocation, Location location)
public void noArgumentValueWasCaptured()
public void extraInterfacesDoesNotAcceptNullParameters()
public void extraInterfacesAcceptsOnlyInterfaces(java.lang.Class<?> wrongType)
public void extraInterfacesCannotContainMockedType(java.lang.Class<?> wrongType)
public void extraInterfacesRequiresAtLeastOneInterface()
public void mockedTypeIsInconsistentWithSpiedInstanceType(java.lang.Class<?> mockedType, java.lang.Object spiedInstance)
public void cannotCallRealMethodOnInterface()
public void cannotVerifyToString()
public void moreThanOneAnnotationNotAllowed(java.lang.String fieldName)
public void unsupportedCombinationOfAnnotations(java.lang.String undesiredAnnotationOne, java.lang.String undesiredAnnotationTwo)
public void cannotInitializeForSpyAnnotation(java.lang.String fieldName, java.lang.Exception details)
public void cannotInitializeForInjectMocksAnnotation(java.lang.String fieldName, java.lang.Exception details)
public void atMostShouldNotBeUsedWithTimeout()
public void fieldInitialisationThrewException(java.lang.reflect.Field field, java.lang.Throwable details)
public void invocationListenerDoesNotAcceptNullParameters()
public void invocationListenersRequiresAtLeastOneListener()
public void invocationListenerThrewException(InvocationListener listener, java.lang.Throwable listenerThrowable)
public void cannotInjectDependency(java.lang.reflect.Field field, java.lang.Object matchingMock, java.lang.Exception details)