176833cb5SWludzik, Jozef #pragma once 276833cb5SWludzik, Jozef 376833cb5SWludzik, Jozef #include "interfaces/trigger.hpp" 476833cb5SWludzik, Jozef 576833cb5SWludzik, Jozef #include <gmock/gmock.h> 676833cb5SWludzik, Jozef 776833cb5SWludzik, Jozef class TriggerMock : public interfaces::Trigger 876833cb5SWludzik, Jozef { 976833cb5SWludzik, Jozef public: TriggerMock(std::string id)10*fbeb5bf4SKrzysztof Grobelny explicit TriggerMock(std::string id) 1176833cb5SWludzik, Jozef { 1276833cb5SWludzik, Jozef using namespace testing; 1376833cb5SWludzik, Jozef 14e28aa53dSSzymon Dompke ON_CALL(*this, getId).WillByDefault([id] { return id; }); 15e28aa53dSSzymon Dompke ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; }); 1676833cb5SWludzik, Jozef EXPECT_CALL(*this, Die).Times(AnyNumber()); 1776833cb5SWludzik, Jozef } 1876833cb5SWludzik, Jozef ~TriggerMock()1976833cb5SWludzik, Jozef virtual ~TriggerMock() 2076833cb5SWludzik, Jozef { 2176833cb5SWludzik, Jozef Die(); 2276833cb5SWludzik, Jozef } 2376833cb5SWludzik, Jozef 24e28aa53dSSzymon Dompke MOCK_METHOD(std::string, getId, (), (const, override)); 2576833cb5SWludzik, Jozef MOCK_METHOD(std::string, getPath, (), (const, override)); 2676833cb5SWludzik, Jozef MOCK_METHOD(void, Die, ()); 2776833cb5SWludzik, Jozef }; 28