blob: cd0e5f4d6434d5659df99a748fd2c4abc21d0844 [file] [log] [blame]
#pragma once
#include "interfaces/trigger.hpp"
#include <gmock/gmock.h>
class TriggerMock : public interfaces::Trigger
{
public:
explicit TriggerMock(std::string id)
{
using namespace testing;
ON_CALL(*this, getId).WillByDefault([id] { return id; });
ON_CALL(*this, getPath).WillByDefault([id] { return "/" + id; });
EXPECT_CALL(*this, Die).Times(AnyNumber());
}
virtual ~TriggerMock()
{
Die();
}
MOCK_METHOD(std::string, getId, (), (const, override));
MOCK_METHOD(std::string, getPath, (), (const, override));
MOCK_METHOD(void, Die, ());
};