Guest User

Untitled

a guest
Jul 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. class SomeClass{
  2. public:
  3. static bool SomeClass::DoAction() {
  4. // do some Actions
  5. };
  6. };
  7.  
  8. class MockSomeClass : public SomeClass {
  9. public:
  10. MockSomeClass() {
  11. ON_CALL(this, DoAction).WillByDefault(testing::Return(true));
  12. }
  13. virtual ~MockSomeClass(){};
  14. MOCK_METHODO(DoAction, bool());
  15.  
  16. FunctionA(){
  17. if (SomeClass::DoAction()){
  18. // do Actions - I wanted to pass the call do the actions.
  19. }
  20. };
Add Comment
Please, Sign In to add comment