blob: 8cc7182f348ecfaabbabc5c9a9a5bcb145e54796 [file] [log] [blame]
Darin Petkove02b3ca2011-05-31 16:00:44 -07001// Copyright (c) 2011 The Chromium OS 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#include "shill/ipconfig.h"
6#include "shill/mock_control.h"
7#include "shill/mock_device.h"
8
9namespace shill {
10using ::testing::Test;
11
12class IPConfigTest : public Test {
13 public:
14 IPConfigTest() :
15 device_(new MockDevice(&control_interface_, NULL, "testname", 0)) {}
16
17 protected:
18 MockControl control_interface_;
19 scoped_refptr<MockDevice> device_;
20};
21
22TEST_F(IPConfigTest, GetDeviceNameTest) {
23 scoped_refptr<IPConfig> ipconfig(new IPConfig(device_.get()));
24 EXPECT_EQ("testname", ipconfig->GetDeviceName());
25}
26
27} // namespace shill