I'm using Google Mock to specify a compatibility layer to an external API. In the external API, there are multiple ways to do some actions, so I want to specify that at least one (or preferably exactly one) expectation from a set of expectations are fulfilled. In pseudocode, this is what I want to do:
Expectation e1 = EXPECT_CALL(API, doFoo(...));
Expectation e2 = EXPECT_CALL(API, doFooAndBar(...));
EXPECT_ONE_OF(e1, e2);
wrapper.foo(...);
Is this possible to do using Google Mock?
Aucun commentaire:
Enregistrer un commentaire