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 missingMethodInvocation()
public void unfinishedVerificationException(Location location)
public void notAMockPassedToVerify()
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(String wanted, String actual, Location actualLocation)
public void wantedButNotInvoked(PrintableInvocation wanted)
public void wantedButNotInvoked(PrintableInvocation wanted, 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(PrintableInvocation undesired)
public void noMoreInteractionsWantedInOrder(Invocation undesired)
public void cannotMockFinalClass(Class<?> clazz)
public void cannotStubVoidMethodWithAReturnValue(String methodName)
public void onlyVoidMethodsCanBeSetToDoNothing()
public void wrongTypeOfReturnValue(String expectedType, String actualType, String methodName)
public void wantedAtMostX(int maxNumberOfInvocations, int foundSize)
public void misplacedArgumentMatcher(Location location)
public void smartNullPointerException(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 cannotCallRealMethodOnInterface()
public void cannotVerifyToString()
public void moreThanOneAnnotationNotAllowed(String fieldName)
public void unsupportedCombinationOfAnnotations(String undesiredAnnotationOne, String undesiredAnnotationTwo)
public void injectMockAnnotationFieldIsNull(String field)
Copyright © 2016. All rights reserved.