Package mockit
Class ExpectationsWithArgMatchersTest
java.lang.Object
mockit.ExpectationsWithArgMatchersTest
The Class ExpectationsWithArgMatchersTest.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Declare field in expectation block with name having same prefix as argument matching field.void
Declare method in expectation block with name having same prefix as argument matching method.void
void
void
Expect invocations with named delegate matcher.void
void
Expect invocation with matcher which invokes mocked method.void
Expect invocation with same mock instance but replay with null.void
Extending A reusable argument matcher.void
Record expectations using the any fields for parameter of type object.void
Record expectations using the with any method for parameter of type object.void
Record expectation with delegate without the parameter type.void
Use mocked method before recording expectation with argument matcher.void
Verify expectation numeric equality matcher but fail to match on replay.void
Verify expectations using numeric equality matchers.void
Verify expectation using inequality matcher but fail to match on replay.void
Verify expectation using numeric equality matcher but replay with non numeric parameter type.
-
Field Details
-
thrown
public final org.junit.rules.ExpectedException thrownThe thrown.
-
-
Constructor Details
-
ExpectationsWithArgMatchersTest
public ExpectationsWithArgMatchersTest()
-
-
Method Details
-
verifyExpectationNumericEqualityMatcherButFailToMatchOnReplay
public void verifyExpectationNumericEqualityMatcherButFailToMatchOnReplay()Verify expectation numeric equality matcher but fail to match on replay. -
verifyExpectationUsingNumericEqualityMatcherButReplayWithNonNumericParameterType
public void verifyExpectationUsingNumericEqualityMatcherButReplayWithNonNumericParameterType()Verify expectation using numeric equality matcher but replay with non numeric parameter type. -
verifyExpectationUsingInequalityMatcherButFailToMatchOnReplay
public void verifyExpectationUsingInequalityMatcherButFailToMatchOnReplay()Verify expectation using inequality matcher but fail to match on replay. -
verifyExpectationsUsingNumericEqualityMatchers
public void verifyExpectationsUsingNumericEqualityMatchers()Verify expectations using numeric equality matchers. -
recordExpectationWithDelegateWithoutTheParameterType
public void recordExpectationWithDelegateWithoutTheParameterType()Record expectation with delegate without the parameter type. -
expectInvocationsWithNamedDelegateMatcher
public void expectInvocationsWithNamedDelegateMatcher()Expect invocations with named delegate matcher. -
expectInvocationsWithHamcrestMatcher
public void expectInvocationsWithHamcrestMatcher() -
expectInvocationsWithHamcrestMatcher2
public void expectInvocationsWithHamcrestMatcher2() -
expectInvocationWithMatcherContainingAnotherMatcher
public void expectInvocationWithMatcherContainingAnotherMatcher() -
useMockedMethodBeforeRecordingExpectationWithArgumentMatcher
public void useMockedMethodBeforeRecordingExpectationWithArgumentMatcher()Use mocked method before recording expectation with argument matcher. -
recordExpectationsUsingTheAnyFieldsForParameterOfTypeObject
public void recordExpectationsUsingTheAnyFieldsForParameterOfTypeObject()Record expectations using the any fields for parameter of type object. -
recordExpectationsUsingTheWithAnyMethodForParameterOfTypeObject
public void recordExpectationsUsingTheWithAnyMethodForParameterOfTypeObject()Record expectations using the with any method for parameter of type object. -
declareFieldInExpectationBlockWithNameHavingSamePrefixAsArgumentMatchingField
public void declareFieldInExpectationBlockWithNameHavingSamePrefixAsArgumentMatchingField()Declare field in expectation block with name having same prefix as argument matching field. -
declareMethodInExpectationBlockWithNameHavingSamePrefixAsArgumentMatchingMethod
public void declareMethodInExpectationBlockWithNameHavingSamePrefixAsArgumentMatchingMethod()Declare method in expectation block with name having same prefix as argument matching method. -
expectInvocationWithSameMockInstanceButReplayWithNull
Expect invocation with same mock instance but replay with null.- Parameters:
cert
- the cert
-
expectInvocationWithMatcherWhichInvokesMockedMethod
public void expectInvocationWithMatcherWhichInvokesMockedMethod()Expect invocation with matcher which invokes mocked method. -
extendingAReusableArgumentMatcher
public void extendingAReusableArgumentMatcher()Extending A reusable argument matcher.
-