Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 1 | #pragma once |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 2 | #include "ethernet_interface.hpp" |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 3 | |
| 4 | #include <gmock/gmock.h> |
| 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace network |
| 9 | { |
| 10 | class MockEthernetInterface : public EthernetInterface |
| 11 | { |
| 12 | public: |
William A. Kennington III | 9ecb90e | 2022-10-14 03:12:43 -0700 | [diff] [blame] | 13 | template <typename... Args> |
| 14 | MockEthernetInterface(Args&&... args) : |
William A. Kennington III | b645254 | 2022-11-15 18:09:12 -0800 | [diff] [blame] | 15 | EthernetInterface(std::forward<Args>(args)..., /*nicEnabled=*/true) |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 16 | { |
| 17 | } |
| 18 | |
William A. Kennington III | 5b17938 | 2022-11-15 15:23:26 -0800 | [diff] [blame] | 19 | MOCK_METHOD((ServerList), getNTPServerFromTimeSyncd, (), (override)); |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 20 | MOCK_METHOD((ServerList), getNameServerFromResolvd, (), (override)); |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 21 | }; |
| 22 | } // namespace network |
| 23 | } // namespace phosphor |