MockNamedValue MockActualFunctionCall::returnValue()
{
	checkExpectations();
	if (_fulfilledExpectation)
		return _fulfilledExpectation->returnValue();
	return MockNamedValue("no return value");
}
MockNamedValue MockSupport::getData(const SimpleString& name)
{
	MockNamedValue* value = data_.getValueByName(name);
	if (value == NULL)
		return MockNamedValue("");
	return *value;
}
예제 #3
0
MockNamedValue MockCheckedActualCall::returnValue()
{
    checkExpectations();
    if (fulfilledExpectation_)
        return fulfilledExpectation_->returnValue();
    return MockNamedValue("no return value");
}
MockNamedValue MockSupport::returnValue()
{
	if (lastActualFunctionCall_) return lastActualFunctionCall_->returnValue();
	return MockNamedValue("");
}
예제 #5
0
TEST(MockCallTest, shouldReturnDefaultWhenThereIsntAnythingToReturn)
{
    CHECK(mock().returnValue().equals(MockNamedValue("")));
}
예제 #6
0
MockNamedValue MockExpectedFunctionCall::getParameter(const SimpleString& name)
{
	MockNamedValue * p = parameters_->getValueByName(name);
	return (p) ? *p : MockNamedValue("");
}
예제 #7
0
MockNamedValue MockCheckedExpectedCall::getOutputParameter(const SimpleString& name)
{
    MockNamedValue * p = outputParameters_->getValueByName(name);
    return (p) ? *p : MockNamedValue("");
}
예제 #8
0
MockNamedValue MockActualCallTrace::returnValue()
{
    return MockNamedValue("");
}