Skip to main content
[ This file is autogenerated from apexdoc ]

AqMatch

ISTEST

Group modules/enterprise

Fields​

public isMatching → Boolean​


Methods​

public static List<AqIArgumentMatcher> getAndClearMatchers(Integer expectedSize)​

Used internally by the mocking framework, you shouldn't need to call this method directly. Copies the registered matchers, and then switches matching mode off.

Parameters​

ParamDescription
expectedSizeThe expected number of matchers to be returned. If this does not match the actual value an expection is thrown.

Returns​

TypeDescription
List<AqIArgumentMatcher>List<AqIArgumentMatcher> The registered matchers, collected while in matching mode.

public static Boolean matchesAllArgs(AqMethodArguments invokedMethodArguments, List<AqIArgumentMatcher> targetMatchers)​

Used internally by the mocking framework, you shouldn't need to call this method directly. Compares all supplied method arg values to the supplied target matchers.

Parameters​

ParamDescription
invokedMethodArgumentsThe arguments supplied when the method was invoked
targetMatchersThe matchers the arguments need to be compared with

Returns​

TypeDescription
BooleanBoolean True if all arg values satisfy all of the supplied matchers.

public static Object isNull()​

Registers a matcher which will check if the method is called with an arg that matches isNull

Returns​

TypeDescription
ObjectObject A dummy object of the correct type, so that when called inline as part of a method call, the correct method is invoked. (You may need to cast down to your specific object type)

public static Object eq(Object toMatch)​

Registers a matcher which will check if the method is called with an arg that matches eq

Parameters​

ParamDescription
toMatchThe Object to be compared

Returns​

TypeDescription
ObjectObject A dummy object of the correct type, so that when called inline as part of a method call, the correct method is invoked. (You may need to cast down to your specific object type)

public static Object matches(AqIArgumentMatcher matcher)​

Registers a matcher which will be stubbed/verified against.

Parameters​

ParamDescription
matcherThe matcher that needs to be compared

Returns​

TypeDescription
ObjectObject Always returns null. This can then be cast into the correct arg type so that the right method is called on the mock objects.