Asmitha Karunanithi | eb40f08 | 2021-07-22 06:13:04 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include "config.h" |
| 4 | |
| 5 | #include "hyp_sys_config.hpp" |
| 6 | |
| 7 | #include <gmock/gmock.h> |
| 8 | |
| 9 | namespace phosphor |
| 10 | { |
| 11 | namespace network |
| 12 | { |
| 13 | |
| 14 | class MockHypSysConfig : public phosphor::network::HypSysConfig |
| 15 | { |
| 16 | public: |
Patrick Williams | c38b071 | 2022-07-22 19:26:54 -0500 | [diff] [blame] | 17 | MockHypSysConfig(sdbusplus::bus_t& bus, const std::string& objPath, |
Asmitha Karunanithi | eb40f08 | 2021-07-22 06:13:04 -0500 | [diff] [blame] | 18 | HypNetworkMgr& parent) : |
| 19 | HypSysConfig(bus, objPath, parent) |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | void setHostname(std::string hn) |
| 24 | { |
| 25 | SysConfigIntf::hostName(hn); |
| 26 | manager.setBIOSTableAttr("vmi_hostname", hn, "String"); |
| 27 | } |
| 28 | |
| 29 | const std::string getHostname() |
| 30 | { |
| 31 | return SysConfigIntf::hostName(); |
| 32 | } |
| 33 | }; |
| 34 | } // namespace network |
| 35 | } // namespace phosphor |