void MockCheckedActualCall::checkOutputParameter(const MockNamedValue& outputParameter) { unfulfilledExpectations_.onlyKeepUnfulfilledExpectationsWithOutputParameter(outputParameter); if (unfulfilledExpectations_.isEmpty()) { MockUnexpectedOutputParameterFailure failure(getTest(), getName(), outputParameter, allExpectations_); failTest(failure); return; } unfulfilledExpectations_.outputParameterWasPassed(outputParameter.getName()); finalizeCallWhenFulfilled(); }
MockActualCall& MockCheckedActualCall::onObject(void* objectPtr) { unfulfilledExpectations_.onlyKeepUnfulfilledExpectationsOnObject(objectPtr); if (unfulfilledExpectations_.isEmpty()) { MockUnexpectedObjectFailure failure(getTest(), getName(), objectPtr, allExpectations_); failTest(failure); return *this; } unfulfilledExpectations_.wasPassedToObject(); finalizeCallWhenFulfilled(); return *this; }
MockActualCall& MockCheckedActualCall::withName(const SimpleString& name) { setName(name); callIsInProgress(); unfulfilledExpectations_.onlyKeepExpectationsRelatedTo(name); if (unfulfilledExpectations_.isEmpty()) { MockUnexpectedCallHappenedFailure failure(getTest(), name, allExpectations_); failTest(failure); return *this; } unfulfilledExpectations_.callWasMade(callOrder_); finalizeCallWhenFulfilled(); return *this; }
void MockCheckedActualCall::checkInputParameter(const MockNamedValue& actualParameter) { if(hasFailed()) { return; } callIsInProgress(); unfulfilledExpectations_.onlyKeepExpectationsWithInputParameter(actualParameter); if (unfulfilledExpectations_.isEmpty()) { MockUnexpectedInputParameterFailure failure(getTest(), getName(), actualParameter, allExpectations_); failTest(failure); return; } unfulfilledExpectations_.parameterWasPassed(actualParameter.getName()); finalizeCallWhenFulfilled(); }