blob: 41c213506a168278e0fbeaf718a1eb1e865f0ee8 [file] [log] [blame]
Patrick Venture123b5c02019-03-05 14:01:00 -08001#pragma once
2
3#include <cstdint>
4#include <vector>
5
6#include <gmock/gmock.h>
7
Patrick Venture1681f7f2019-03-07 12:59:29 -08008namespace ipmiblob
9{
10
Patrick Venture123b5c02019-03-05 14:01:00 -080011class CrcInterface
12{
13 public:
14 virtual ~CrcInterface() = default;
15
16 virtual std::uint16_t
17 generateCrc(const std::vector<std::uint8_t>& data) const = 0;
18};
19
20class CrcMock : public CrcInterface
21{
22 public:
23 virtual ~CrcMock() = default;
24 MOCK_CONST_METHOD1(generateCrc,
25 std::uint16_t(const std::vector<std::uint8_t>&));
26};
Patrick Venture1681f7f2019-03-07 12:59:29 -080027
28} // namespace ipmiblob