blob: 67bf9fd281c5a33d46fc6ad91bcc93eba4fd8984 [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;
Willy Tu8da5f722021-04-24 16:30:50 -070024 MOCK_METHOD(std::uint16_t, generateCrc, (const std::vector<std::uint8_t>&),
25 (const, override));
Patrick Venture123b5c02019-03-05 14:01:00 -080026};
Patrick Venture1681f7f2019-03-07 12:59:29 -080027
28} // namespace ipmiblob