void MockCheckedActualCall::checkExpectations() { if (state_ != CALL_IN_PROGRESS) { unfulfilledExpectations_.resetExpectations(); return; } if (! unfulfilledExpectations_.hasUnfulfilledExpectations()) FAIL("Actual call is in progress. Checking expectations. But no unfulfilled expectations. Cannot happen.") // LCOV_EXCL_LINE fulfilledExpectation_ = unfulfilledExpectations_.removeOneFulfilledExpectationWithIgnoredParameters(); if (fulfilledExpectation_) { callHasSucceeded(); unfulfilledExpectations_.resetExpectations(); return; } if (unfulfilledExpectations_.hasUnfulfilledExpectationsBecauseOfMissingParameters()) { MockExpectedParameterDidntHappenFailure failure(getTest(), getName(), allExpectations_); failTest(failure); } else { MockExpectedObjectDidntHappenFailure failure(getTest(), getName(), allExpectations_); failTest(failure); } }
void MockActualFunctionCall::finnalizeCallWhenFulfilled() { if (unfulfilledExpectations_.hasFulfilledExpectations()) { _fulfilledExpectation = unfulfilledExpectations_.removeOneFulfilledExpectation(); callHasSucceeded(); } }
void MockCheckedActualCall::finalizeCallWhenFulfilled() { if (unfulfilledExpectations_.hasFulfilledExpectations()) { fulfilledExpectation_ = unfulfilledExpectations_.removeOneFulfilledExpectation(); finalizeOutputParameters(); callHasSucceeded(); } }