blob: 2e698015fee37e9fcd24981143a0d0be1e0b321c [file] [log] [blame]
// Copyright 2018 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SHILL_MOCK_IPCONFIG_H_
#define SHILL_MOCK_IPCONFIG_H_
#include <string>
#include <vector>
#include <base/macros.h>
#include <gmock/gmock.h>
#include "shill/ipconfig.h"
namespace shill {
class MockIPConfig : public IPConfig {
public:
MockIPConfig(ControlInterface* control_interface,
const std::string& device_name);
MockIPConfig(const MockIPConfig&) = delete;
MockIPConfig& operator=(const MockIPConfig&) = delete;
~MockIPConfig() override;
MOCK_METHOD(const Properties&, properties, (), (const, override));
MOCK_METHOD(bool, RequestIP, (), (override));
MOCK_METHOD(bool, RenewIP, (), (override));
MOCK_METHOD(bool, ReleaseIP, (ReleaseReason), (override));
MOCK_METHOD(void, Refresh, (), (override));
MOCK_METHOD(void, ResetProperties, (), (override));
MOCK_METHOD(void, EmitChanges, (), (override));
MOCK_METHOD(void, UpdateDNSServers, (std::vector<std::string>), (override));
private:
const Properties& real_properties() const { return IPConfig::properties(); }
};
} // namespace shill
#endif // SHILL_MOCK_IPCONFIG_H_