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:
10     TriggerMock(std::string name)
11     {
12         using namespace testing;
13 
14         ON_CALL(*this, getName).WillByDefault([name] { return name; });
15         ON_CALL(*this, getPath).WillByDefault([name] { return "/" + name; });
16         EXPECT_CALL(*this, Die).Times(AnyNumber());
17     }
18 
19     virtual ~TriggerMock()
20     {
21         Die();
22     }
23 
24     MOCK_METHOD(std::string, getName, (), (const, override));
25     MOCK_METHOD(std::string, getPath, (), (const, override));
26     MOCK_METHOD(void, Die, ());
27 };
28