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) : |
| 15 | EthernetInterface(std::forward<Args>(args)..., /*emitSignal=*/false, |
William A. Kennington III | 26275a3 | 2021-07-13 20:32:42 -0700 | [diff] [blame] | 16 | /*nicEnabled=*/true) |
Manojkiran Eda | acd6dd5 | 2019-10-15 15:00:51 +0530 | [diff] [blame] | 17 | { |
| 18 | } |
| 19 | |
| 20 | MOCK_METHOD((ServerList), getNameServerFromResolvd, (), (override)); |
| 21 | friend class TestEthernetInterface; |
| 22 | }; |
| 23 | } // namespace network |
| 24 | } // namespace phosphor |