blob: be40a65013d4de49fbb7df9972841aefc7fc2fff [file] [log] [blame]
Wludzik, Jozef76833cb2020-12-21 14:42:41 +01001#pragma once
2
3#include "interfaces/trigger.hpp"
4
5#include <gmock/gmock.h>
6
7class TriggerMock : public interfaces::Trigger
8{
9 public:
Szymon Dompkee28aa532021-10-27 12:33:12 +020010 TriggerMock(std::string id)
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010011 {
12 using namespace testing;
13
Szymon Dompkee28aa532021-10-27 12:33:12 +020014 ON_CALL(*this, getId).WillByDefault([id] { return id; });
15 ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; });
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010016 EXPECT_CALL(*this, Die).Times(AnyNumber());
17 }
18
19 virtual ~TriggerMock()
20 {
21 Die();
22 }
23
Szymon Dompkee28aa532021-10-27 12:33:12 +020024 MOCK_METHOD(std::string, getId, (), (const, override));
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010025 MOCK_METHOD(std::string, getPath, (), (const, override));
26 MOCK_METHOD(void, Die, ());
27};