Let's say you have this:
EXPECT_CALL(MockClass_obj, f1(55)).Times(1);
// use the expectation
// ...
// Now clear it
Mock::VerifyAndClear(&MockClass_obj)
Is it possible to
1) Save the expectation
AND
2) Re-use it later and change the clauses?
From here I know it's possible to save expectations
but there's nowhere else that expounds on what else can be done.
Referring to the above code, I want to do something like:
Expecatation exp1 = EXPECT_CALL(MockClass_obj, f1(55)).Times(1);
// use the expectation
// ...
// Now clear it
Mock::VerifyAndClear(&MockClass_obj)
// Somehow modify exp1 to change the cardinality or any of the clauses
// so that I can make the test immediately readable and convey that it's very much related to the one above":
// Instead of this:
EXPECT_CALL(MockClass_obj, f1(55)).Times(0);
// I wanna do something like
exp1.Times(0)