• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef DISCOVERY_DNSSD_TESTING_FAKE_NETWORK_INTERFACE_CONFIG_H_
6 #define DISCOVERY_DNSSD_TESTING_FAKE_NETWORK_INTERFACE_CONFIG_H_
7 
8 #include "discovery/dnssd/impl/network_interface_config.h"
9 #include "gmock/gmock.h"
10 
11 namespace openscreen {
12 namespace discovery {
13 
14 class FakeNetworkInterfaceConfig : public NetworkInterfaceConfig {
15  public:
16   FakeNetworkInterfaceConfig() = default;
17 
set_network_interface(NetworkInterfaceIndex network_interface)18   void set_network_interface(NetworkInterfaceIndex network_interface) {
19     network_interface_ = network_interface;
20   }
21 
set_address_v4(IPAddress address)22   void set_address_v4(IPAddress address) { address_v4_ = std::move(address); }
23 
set_address_v6(IPAddress address)24   void set_address_v6(IPAddress address) { address_v6_ = std::move(address); }
25 };
26 
27 }  // namespace discovery
28 }  // namespace openscreen
29 
30 #endif  // DISCOVERY_DNSSD_TESTING_FAKE_NETWORK_INTERFACE_CONFIG_H_
31