[ This file is autogenerated from apexdoc ]
ISTEST
Implemented types
System.StubProvider
Group modules/enterprise
Constructors
public AqApexMocks()
Methods
public Object mock(Type classToMock)
Creates mock object of given class or interface.
Parameters
| Param | Description |
|---|
classToMock | class or interface to mock. |
Returns
| Type | Description |
|---|
Object | mock object. |
public Object handleMethodCall(Object stubbedObject, String stubbedMethodName, Type returnType, List<Type> listOfParamTypes, List<String> listOfParamNames, List<Object> listOfArgs)
Inherited from StubProvider.
Parameters
| Param | Description |
|---|
stubbedObject | The stubbed object. |
stubbedMethodName | The name of the invoked method. |
returnType | The return type of the invoked method. |
listOfParamTypes | A list of the parameter types of the invoked method. |
listOfParamNames | A list of the parameter names of the invoked method. |
listOfArgs | The actual argument values passed into this method at runtime. |
Returns
| Type | Description |
|---|
Object | The stubbed return value. Null by default, unless you prepared one that matches this method and argument values in stubbing. |
public void startStubbing()
Tell ApexMocks framework you are about to start stubbing using when() calls.
public void stopStubbing()
Tell ApexMocks framework you are about to stop stubbing using when() calls.
public AqMethodReturnValue when(Object ignoredRetValue)
SUPPRESSWARNINGS
Method to start recording method usage inside stubbing context
Parameters
| Param | Description |
|---|
ignoredRetValue | ignored returned value of called mocked instance method, invocation will be stubbed |
Returns
| Type | Description |
|---|
AqMethodReturnValue | The mock object instance. |
public Object verify(Object mockInstance)
Verify a method was called on a mock object.
Parameters
| Param | Description |
|---|
mockInstance | The mock object instance. |
Returns
| Type | Description |
|---|
Object | The mock object instance. |
public Object verify(Object mockInstance, Integer times)
Verify a method was called on a mock object.
Parameters
| Param | Description |
|---|
mockInstance | The mock object instance. |
times | How many times it was called |
Returns
| Type | Description |
|---|
Object | The mock object instance. |
Classes
AqApexMocksException
Inheritance
AqApexMocksException