Package mockit
Class MisusedMockingAPITest
java.lang.Object
mockit.MisusedMockingAPITest
The Class MisusedMockingAPITest.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Ambiguous cascading when multiple valid candidates are available.void
attemptingToMockAllInstancesOfExceptionSubclass
(mockit.MisusedMockingAPITest.CustomException anyCustomException) Attempting to mock all instances of exception subclass.void
Check static injectable is not used.void
Record duplicate invocation in separate expectation blocks.void
Record duplicate invocation with argument matcher.void
Record duplicate invocation with no arguments.void
Record expectation after invoking same method in replay phase.void
Record mock instance for constructor expectation.void
Record unordered instantiation of class mocked twice.void
Verify ordered instantiation of class mocked twice.void
Verify unordered instantiation of class mocked twice.
-
Field Details
-
thrown
public final org.junit.rules.ExpectedException thrownThe thrown.
-
-
Constructor Details
-
MisusedMockingAPITest
public MisusedMockingAPITest()
-
-
Method Details
-
recordExpectationAfterInvokingSameMethodInReplayPhase
public void recordExpectationAfterInvokingSameMethodInReplayPhase()Record expectation after invoking same method in replay phase. -
recordDuplicateInvocationWithNoArguments
public void recordDuplicateInvocationWithNoArguments()Record duplicate invocation with no arguments. -
recordDuplicateInvocationWithArgumentMatcher
public void recordDuplicateInvocationWithArgumentMatcher()Record duplicate invocation with argument matcher. -
recordDuplicateInvocationInSeparateExpectationBlocks
public void recordDuplicateInvocationInSeparateExpectationBlocks()Record duplicate invocation in separate expectation blocks. -
recordMockInstanceForConstructorExpectation
public void recordMockInstanceForConstructorExpectation()Record mock instance for constructor expectation. -
recordUnorderedInstantiationOfClassMockedTwice
Record unordered instantiation of class mocked twice.- Parameters:
mock2
- the mock 2
-
verifyOrderedInstantiationOfClassMockedTwice
Verify ordered instantiation of class mocked twice.- Parameters:
mock2
- the mock 2
-
verifyUnorderedInstantiationOfClassMockedTwice
Verify unordered instantiation of class mocked twice.- Parameters:
mock2
- the mock 2
-
ambiguousCascadingWhenMultipleValidCandidatesAreAvailable
Ambiguous cascading when multiple valid candidates are available.- Parameters:
r1
- the r 1r2
- the r 2
-
checkStaticInjectableIsNotUsed
public void checkStaticInjectableIsNotUsed()Check static injectable is not used. -
attemptingToMockAllInstancesOfExceptionSubclass
public void attemptingToMockAllInstancesOfExceptionSubclass(mockit.MisusedMockingAPITest.CustomException anyCustomException) Attempting to mock all instances of exception subclass.- Parameters:
anyCustomException
- the any custom exception
-