28 #ifndef D_MockExpectedCallsList_h 29 #define D_MockExpectedCallsList_h 31 class MockCheckedExpectedCall;
34 class MockExpectedCallsList
38 MockExpectedCallsList();
39 virtual ~MockExpectedCallsList();
40 virtual void deleteAllExpectationsAndClearList();
42 virtual unsigned int size()
const;
43 virtual unsigned int amountOfExpectationsFor(
const SimpleString& name)
const;
44 virtual unsigned int amountOfUnfulfilledExpectations()
const;
45 virtual bool hasUnfulfilledExpectations()
const;
46 virtual bool hasFinalizedMatchingExpectations()
const;
47 virtual bool hasUnmatchingExpectationsBecauseOfMissingParameters()
const;
48 virtual bool hasExpectationWithName(
const SimpleString& name)
const;
49 virtual bool hasCallsOutOfOrder()
const;
50 virtual bool isEmpty()
const;
52 virtual void addExpectedCall(MockCheckedExpectedCall* call);
53 virtual void addExpectations(
const MockExpectedCallsList& list);
54 virtual void addExpectationsRelatedTo(
const SimpleString& name,
const MockExpectedCallsList& list);
56 virtual void onlyKeepOutOfOrderExpectations();
57 virtual void addPotentiallyMatchingExpectations(
const MockExpectedCallsList& list);
59 virtual void onlyKeepExpectationsRelatedTo(
const SimpleString& name);
60 virtual void onlyKeepExpectationsWithInputParameter(
const MockNamedValue& parameter);
61 virtual void onlyKeepExpectationsWithInputParameterName(
const SimpleString& name);
62 virtual void onlyKeepExpectationsWithOutputParameter(
const MockNamedValue& parameter);
63 virtual void onlyKeepExpectationsWithOutputParameterName(
const SimpleString& name);
64 virtual void onlyKeepExpectationsOnObject(
const void* objectPtr);
65 virtual void onlyKeepUnmatchingExpectations();
67 virtual MockCheckedExpectedCall* removeFirstFinalizedMatchingExpectation();
68 virtual MockCheckedExpectedCall* removeFirstMatchingExpectation();
69 virtual MockCheckedExpectedCall* getFirstMatchingExpectation();
71 virtual void resetActualCallMatchingState();
72 virtual void callWasMade(
unsigned int callOrder);
73 virtual void wasPassedToObject();
74 virtual void parameterWasPassed(
const SimpleString& parameterName);
75 virtual void outputParameterWasPassed(
const SimpleString& parameterName);
77 virtual SimpleString unfulfilledCallsToString(
const SimpleString& linePrefix =
"")
const;
78 virtual SimpleString fulfilledCallsToString(
const SimpleString& linePrefix =
"")
const;
79 virtual SimpleString missingParametersToString()
const;
82 virtual void pruneEmptyNodeFromList();
84 class MockExpectedCallsListNode
87 MockCheckedExpectedCall* expectedCall_;
89 MockExpectedCallsListNode* next_;
90 MockExpectedCallsListNode(MockCheckedExpectedCall* expectedCall)
91 : expectedCall_(expectedCall), next_(
NULL) {}
94 virtual MockExpectedCallsListNode* findNodeWithCallOrderOf(
unsigned int callOrder)
const;
96 MockExpectedCallsListNode* head_;
98 MockExpectedCallsList(
const MockExpectedCallsList&);
#define NULL
Definition: nm_bsp.h:76