Voglio testare l'eventuale in caso di errore nessun metodo verrà chiamato su un oggetto fittizio, usando google mock. modo che il codice essere qualcosa del tipo:google mock: come posso "ASPETTARE" che nessun metodo verrà chiamato su un finto
auto mocObj = new MockObj;
EXPECT_NO_METHOD_CALL(mocObj); //this is what I'm locking for
auto mainObj = new MainObj(mocObj , ......and other mocks); // here I simulate a fail using the other mock objects, and I want to be sure the no methods are called on the mockObj
Domanda: perché stai facendo il newing dei tuoi oggetti? Non è necessario ... –