1 #pragma once
2 
3 #include "interfaces/trigger.hpp"
4 
5 #include <gmock/gmock.h>
6 
7 class TriggerMock : public interfaces::Trigger
8 {
9   public:
TriggerMock(std::string id)10     explicit TriggerMock(std::string id)
11     {
12         using namespace testing;
13 
14         ON_CALL(*this, getId).WillByDefault([id] { return id; });
15         ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; });
16         EXPECT_CALL(*this, Die).Times(AnyNumber());
17     }
18 
~TriggerMock()19     virtual ~TriggerMock()
20     {
21         Die();
22     }
23 
24     MOCK_METHOD(std::string, getId, (), (const, override));
25     MOCK_METHOD(std::string, getPath, (), (const, override));
26     MOCK_METHOD(void, Die, ());
27 };
28