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: 17 MockHypSysConfig(sdbusplus::bus_t& bus, const std::string& objPath, 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 36