Here are some quick examples of how to use dmocks and mock objects:

  • BasicMocks : creating mock objects and setting expectations
  • RepeatingCalls : allowing a method to be called multiple times
  • IgnoreArguments : just call it somehow
  • ActOnCall : set up actions to be performed when a method is called
  • PassThrough : use the original method rather than manually setting return values and exceptions
  • OrderedExpectations : require that certain actions happen in a particular order
  • Allowing : set up a result for a method, without testing for it.

back to the main page