LastCall |
LastCallAllows to set options for the method calls. note: If the method has a return value, it’s recommended to use Expect Summary
OptionsInternal! Get the method options for the last method call from all the mock objects. Throws an exception if there is no such call. Thread safetyNot safe for mutli threading, use On ThrowThrows the specified exception when the method is called. Thread safetyNot safe for mutli threading, use On IgnoreArgumentsIgnores the arguments for this method. Any arguments are considered fine for this method. Thread safetyNot safe for mutli threading, use On RepeatAllows to get the <Interfaces.IRepeat> instance that would allow to set the expected number of times that this method will occur. Thread safetyNot safe for mutli threading, use On ConstraintsSets the contraints on this method parameters. The number of the constraints must be equal to the number of method arguments. Thread safetyNot safe for mutli threading, use On CallbackSets a callback delegate to be called when this method is called. ImportantThe callback must have the same signature as the last method call but its return value must be a boolean. The callback will be called with the same parameters as the method and the method will be accepted if the delegate return a positive value. Note: The callback may be called several times Thread safetyNot safe for mutli threading, use On DoSet an action to run when the expectation is matched. ImportantThe action’s delegate must have the same signature as the last methdo call, and its return value must be assignable to the last method call return value. NoteThis method is only called once, after the method call was match to the expectation. |