blob: cd0e5f4d6434d5659df99a748fd2c4abc21d0844 [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:
Krzysztof Grobelnyfbeb5bf2022-01-03 09:41:29 +010010 explicit 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));
Wludzik, Jozef76833cb2020-12-21 14:42:41 +010026 MOCK_METHOD(void, Die, ());
27};