public class Reporter extends 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(Throwable t)
public void cannotStubWithNullThrowable()
public void unfinishedStubbing(Location location)
public void incorrectUseOfApi()
public void missingMethodInvocation()
public void unfinishedVerificationException(Location location)
public void notAMockPassedToVerify(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, List<LocalizedMatcher> recordedMatchers)
public void incorrectUseOfAdditionalMatchers(String additionalMatcherName, int expectedSubMatchersCount, Collection<LocalizedMatcher> matcherStack)
public void stubPassedToVerify()
public void reportNoSubMatchersFound(String additionalMatcherName)
public void argumentsAreDifferent(String wanted, String actual, Location actualLocation)
public void wantedButNotInvoked(DescribedInvocation wanted)
public void wantedButNotInvoked(DescribedInvocation wanted, List<? extends DescribedInvocation> invocations)
public void wantedButNotInvokedInOrder(DescribedInvocation wanted, DescribedInvocation previous)
public void tooManyActualInvocations(int wantedCount, int actualCount, DescribedInvocation wanted, Location firstUndesired)
public void neverWantedButInvoked(DescribedInvocation wanted, Location firstUndesired)
public void tooManyActualInvocationsInOrder(int wantedCount, int actualCount, DescribedInvocation wanted, Location firstUndesired)
public void tooLittleActualInvocations(Discrepancy discrepancy, DescribedInvocation wanted, Location lastActualLocation)
public void tooLittleActualInvocationsInOrder(Discrepancy discrepancy, DescribedInvocation wanted, Location lastActualLocation)
public void noMoreInteractionsWanted(Invocation undesired, List<VerificationAwareInvocation> invocations)
public void noMoreInteractionsWantedInOrder(Invocation undesired)
public void cannotStubVoidMethodWithAReturnValue(String methodName)
public void onlyVoidMethodsCanBeSetToDoNothing()
public void wrongTypeOfReturnValue(String expectedType, String actualType, String methodName)
public void wrongTypeReturnedByDefaultAnswer(Object mock, String expectedType, String actualType, String methodName)
public void wantedAtMostX(int maxNumberOfInvocations, int foundSize)
public void misplacedArgumentMatcher(List<LocalizedMatcher> lastMatchers)
public void smartNullPointerException(String invocation, Location location)
public void noArgumentValueWasCaptured()
public void extraInterfacesDoesNotAcceptNullParameters()
public void extraInterfacesAcceptsOnlyInterfaces(Class<?> wrongType)
public void extraInterfacesCannotContainMockedType(Class<?> wrongType)
public void extraInterfacesRequiresAtLeastOneInterface()
public void mockedTypeIsInconsistentWithSpiedInstanceType(Class<?> mockedType, Object spiedInstance)
public void cannotCallAbstractRealMethod()
public void cannotVerifyToString()
public void moreThanOneAnnotationNotAllowed(String fieldName)
public void unsupportedCombinationOfAnnotations(String undesiredAnnotationOne, String undesiredAnnotationTwo)
public void cannotInitializeForSpyAnnotation(String fieldName, Exception details)
public void cannotInitializeForInjectMocksAnnotation(String fieldName, Exception details)
public void atMostAndNeverShouldNotBeUsedWithTimeout()
public void fieldInitialisationThrewException(Field field, Throwable details)
public void invocationListenerDoesNotAcceptNullParameters()
public void invocationListenersRequiresAtLeastOneListener()
public void invocationListenerThrewException(InvocationListener listener, Throwable listenerThrowable)
public void cannotInjectDependency(Field field, Object matchingMock, Exception details)
public void mockedTypeIsInconsistentWithDelegatedInstanceType(Class mockedType, Object delegatedInstance)
public void spyAndDelegateAreMutuallyExclusive()
public void invalidArgumentRangeAtIdentityAnswerCreationTime()
public int invalidArgumentPositionRangeAtInvocationTime(InvocationOnMock invocation, boolean willReturnLastParameter, int argumentIndex)
public void wrongTypeOfArgumentToReturn(InvocationOnMock invocation, String expectedType, Class actualType, int argumentIndex)
public void defaultAnswerDoesNotAcceptNullParameter()
public void serializableWontWorkForObjectsThatDontImplementSerializable(Class classToMock)
public void delegatedMethodHasWrongReturnType(Method mockMethod, Method delegateMethod, Object mock, Object delegate)
public void delegatedMethodDoesNotExistOnDelegate(Method mockMethod, Object mock, Object delegate)
public void usingConstructorWithFancySerializable(SerializableMode mode)
public void cannotCreateTimerWithNegativeDurationTime(long durationMillis)
public void notAnException()