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