Package mockit
Class VerificationsTest
java.lang.Object
mockit.VerificationsTest
The Class VerificationsTest.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Verify invocations with invocation count.void
Verify invocations with invocation count larger than occurred.void
Verify invocations with invocation count smaller than occurred.void
Verify invocation that is allowed to happen once or more and happens once.void
Verify invocation that matches expectation recorded with any matcher but with argument value which did not occur.void
Verify invocation that should not occur but did.void
Verify recorded invocation that never happens.void
Verify simple invocations.void
Verify through captured arguments.void
Verify unrecorded invocation that never happens.void
Verify unrecorded invocation that should happen but does not.void
Verify with argument matcher.void
Verify with argument matcher and individual invocation counts.void
Verify with custom argument matcher.void
Verify with custom argument matcher without argument value.void
verityTwoInvocationsToMethodMatchedOnSpecificInstanceWithNoArgumentMatchers
(VerificationsTest.Dependency dep) Verity two invocations to method matched on specific instance with no argument matchers.
-
Field Details
-
thrown
public final org.junit.rules.ExpectedException thrownThe thrown.
-
-
Constructor Details
-
VerificationsTest
public VerificationsTest()
-
-
Method Details
-
verifySimpleInvocations
public void verifySimpleInvocations()Verify simple invocations. -
verifyUnrecordedInvocationThatNeverHappens
public void verifyUnrecordedInvocationThatNeverHappens()Verify unrecorded invocation that never happens. -
verifyRecordedInvocationThatNeverHappens
public void verifyRecordedInvocationThatNeverHappens()Verify recorded invocation that never happens. -
verifyInvocationThatIsAllowedToHappenOnceOrMoreAndHappensOnce
public void verifyInvocationThatIsAllowedToHappenOnceOrMoreAndHappensOnce()Verify invocation that is allowed to happen once or more and happens once. -
verifyUnrecordedInvocationThatShouldHappenButDoesNot
public void verifyUnrecordedInvocationThatShouldHappenButDoesNot()Verify unrecorded invocation that should happen but does not. -
verifyInvocationsWithInvocationCount
public void verifyInvocationsWithInvocationCount()Verify invocations with invocation count. -
verifyInvocationsWithInvocationCountLargerThanOccurred
public void verifyInvocationsWithInvocationCountLargerThanOccurred()Verify invocations with invocation count larger than occurred. -
verifyInvocationsWithInvocationCountSmallerThanOccurred
public void verifyInvocationsWithInvocationCountSmallerThanOccurred()Verify invocations with invocation count smaller than occurred. -
verifyInvocationThatShouldNotOccurButDid
public void verifyInvocationThatShouldNotOccurButDid()Verify invocation that should not occur but did. -
verifyWithArgumentMatcher
public void verifyWithArgumentMatcher()Verify with argument matcher. -
verifyWithArgumentMatcherAndIndividualInvocationCounts
public void verifyWithArgumentMatcherAndIndividualInvocationCounts()Verify with argument matcher and individual invocation counts. -
verifyWithCustomArgumentMatcherWithoutArgumentValue
public void verifyWithCustomArgumentMatcherWithoutArgumentValue()Verify with custom argument matcher without argument value. -
verifyThroughCapturedArguments
public void verifyThroughCapturedArguments()Verify through captured arguments. -
verifyWithCustomArgumentMatcher
public void verifyWithCustomArgumentMatcher()Verify with custom argument matcher. -
verifyInvocationThatMatchesExpectationRecordedWithAnyMatcherButWithArgumentValueWhichDidNotOccur
public void verifyInvocationThatMatchesExpectationRecordedWithAnyMatcherButWithArgumentValueWhichDidNotOccur()Verify invocation that matches expectation recorded with any matcher but with argument value which did not occur. -
verityTwoInvocationsToMethodMatchedOnSpecificInstanceWithNoArgumentMatchers
public void verityTwoInvocationsToMethodMatchedOnSpecificInstanceWithNoArgumentMatchers(VerificationsTest.Dependency dep) Verity two invocations to method matched on specific instance with no argument matchers.- Parameters:
dep
- the dep
-