MockCheckedExpectedCall* addFunctionToExpectationsList(const SimpleString& name, int order) { MockCheckedExpectedCall* newCall = new MockCheckedExpectedCall; newCall->withName(name); newCall->withCallOrder(order); expectationsList->addExpectedCall(newCall); return newCall; }
MockExpectedCall& MockSupport::expectOneCall(const SimpleString& functionName) { if (!enabled_) return MockIgnoredExpectedCall::instance(); MockCheckedExpectedCall* call = new MockCheckedExpectedCall; call->withName(functionName); if (strictOrdering_) call->withCallOrder(++expectedCallOrder_); expectations_.addExpectedCall(call); return *call; }