Package mockit
Class VerificationsInOrderTest
java.lang.Object
mockit.VerificationsInOrderTest
The Class VerificationsInOrderTest.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The Class Dependency. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Verify all invocations with some of them recorded.void
Verify invocation not expected to occur but which does.void
Verify invocations with exact invocation counts having recorded matching expectation with argument matcher.void
Verify invocation that is allowed to happen any number of times and happens once.void
Verify recorded invocation that should happen but does not.void
Verify repeating invocation.void
Verify repeating invocation that occurs one time more than expected.void
Verify repeating invocation using matcher.void
Verify second sequence of invocations with times constraint after verifying last invocation of first sequence.void
Verify simple invocations.void
Verify simple invocations when out of order.void
Verify two independent sequences of invocations which are mixed together.void
Verify two independent sequences of invocations which occur separately.void
Verify unrecorded invocation that should happen but does not.void
Verify unrecorded invocation that should happen exactly once but does not.void
verifyUsingInvocationCountConstraintAndArgumentMatcherOnObjectWithMockedHashCode
(mockit.VerificationsInOrderTest.ClassWithHashCode wh) Verify using invocation count constraint and argument matcher on object with mocked hash code.void
Verify with argument matcher.void
Verify with argument matcher and individual invocation count when out of order.void
Verify with argument matchers when out of order.void
Verify with individual invocation counts for non consecutive invocations.
-
Field Details
-
thrown
public final org.junit.rules.ExpectedException thrownThe thrown.
-
-
Constructor Details
-
VerificationsInOrderTest
public VerificationsInOrderTest()
-
-
Method Details
-
verifySimpleInvocations
public void verifySimpleInvocations()Verify simple invocations. -
verifyUnrecordedInvocationThatShouldHappenButDoesNot
public void verifyUnrecordedInvocationThatShouldHappenButDoesNot()Verify unrecorded invocation that should happen but does not. -
verifyUnrecordedInvocationThatShouldHappenExactlyOnceButDoesNot
public void verifyUnrecordedInvocationThatShouldHappenExactlyOnceButDoesNot()Verify unrecorded invocation that should happen exactly once but does not. -
verifyRecordedInvocationThatShouldHappenButDoesNot
public void verifyRecordedInvocationThatShouldHappenButDoesNot()Verify recorded invocation that should happen but does not. -
verifyAllInvocationsWithSomeOfThemRecorded
public void verifyAllInvocationsWithSomeOfThemRecorded()Verify all invocations with some of them recorded. -
verifyInvocationsWithExactInvocationCountsHavingRecordedMatchingExpectationWithArgumentMatcher
public void verifyInvocationsWithExactInvocationCountsHavingRecordedMatchingExpectationWithArgumentMatcher()Verify invocations with exact invocation counts having recorded matching expectation with argument matcher. -
verifyInvocationThatIsAllowedToHappenAnyNumberOfTimesAndHappensOnce
public void verifyInvocationThatIsAllowedToHappenAnyNumberOfTimesAndHappensOnce()Verify invocation that is allowed to happen any number of times and happens once. -
verifySimpleInvocationsWhenOutOfOrder
public void verifySimpleInvocationsWhenOutOfOrder()Verify simple invocations when out of order. -
verifyRepeatingInvocation
public void verifyRepeatingInvocation()Verify repeating invocation. -
verifyRepeatingInvocationThatOccursOneTimeMoreThanExpected
public void verifyRepeatingInvocationThatOccursOneTimeMoreThanExpected()Verify repeating invocation that occurs one time more than expected. -
verifyRepeatingInvocationUsingMatcher
public void verifyRepeatingInvocationUsingMatcher()Verify repeating invocation using matcher. -
verifyInvocationNotExpectedToOccurButWhichDoes
public void verifyInvocationNotExpectedToOccurButWhichDoes()Verify invocation not expected to occur but which does. -
verifyWithArgumentMatcher
public void verifyWithArgumentMatcher()Verify with argument matcher. -
verifyWithIndividualInvocationCountsForNonConsecutiveInvocations
public void verifyWithIndividualInvocationCountsForNonConsecutiveInvocations()Verify with individual invocation counts for non consecutive invocations. -
verifyUsingInvocationCountConstraintAndArgumentMatcherOnObjectWithMockedHashCode
public void verifyUsingInvocationCountConstraintAndArgumentMatcherOnObjectWithMockedHashCode(mockit.VerificationsInOrderTest.ClassWithHashCode wh) Verify using invocation count constraint and argument matcher on object with mocked hash code.- Parameters:
wh
- the wh
-
verifyWithArgumentMatchersWhenOutOfOrder
public void verifyWithArgumentMatchersWhenOutOfOrder()Verify with argument matchers when out of order. -
verifyWithArgumentMatcherAndIndividualInvocationCountWhenOutOfOrder
public void verifyWithArgumentMatcherAndIndividualInvocationCountWhenOutOfOrder()Verify with argument matcher and individual invocation count when out of order. -
verifyTwoIndependentSequencesOfInvocationsWhichOccurSeparately
public void verifyTwoIndependentSequencesOfInvocationsWhichOccurSeparately()Verify two independent sequences of invocations which occur separately. -
verifyTwoIndependentSequencesOfInvocationsWhichAreMixedTogether
public void verifyTwoIndependentSequencesOfInvocationsWhichAreMixedTogether()Verify two independent sequences of invocations which are mixed together. -
verifySecondSequenceOfInvocationsWithTimesConstraintAfterVerifyingLastInvocationOfFirstSequence
public void verifySecondSequenceOfInvocationsWithTimesConstraintAfterVerifyingLastInvocationOfFirstSequence()Verify second sequence of invocations with times constraint after verifying last invocation of first sequence.
-