Darin Petkov | e02b3ca | 2011-05-31 16:00:44 -0700 | [diff] [blame] | 1 | // 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 | |
| 9 | namespace shill { |
| 10 | using ::testing::Test; |
| 11 | |
| 12 | class 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 | |
| 22 | TEST_F(IPConfigTest, GetDeviceNameTest) { |
| 23 | scoped_refptr<IPConfig> ipconfig(new IPConfig(device_.get())); |
| 24 | EXPECT_EQ("testname", ipconfig->GetDeviceName()); |
| 25 | } |
| 26 | |
| 27 | } // namespace shill |