shill: Implement a basic IPConfig class.

Different IP configuration types will inherit from that class -- e.g., DHCP
clients, PPP, etc.

BUG=chromium-os:15953
TEST=unit test

Change-Id: Id6ba4559afdf0b10dac43fed55ab51d272aeb4df
Reviewed-on: http://gerrit.chromium.org/gerrit/1852
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/ipconfig_unittest.cc b/ipconfig_unittest.cc
new file mode 100644
index 0000000..8cc7182
--- /dev/null
+++ b/ipconfig_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 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.
+
+#include "shill/ipconfig.h"
+#include "shill/mock_control.h"
+#include "shill/mock_device.h"
+
+namespace shill {
+using ::testing::Test;
+
+class IPConfigTest : public Test {
+ public:
+  IPConfigTest() :
+      device_(new MockDevice(&control_interface_, NULL, "testname", 0)) {}
+
+ protected:
+  MockControl control_interface_;
+  scoped_refptr<MockDevice> device_;
+};
+
+TEST_F(IPConfigTest, GetDeviceNameTest) {
+  scoped_refptr<IPConfig> ipconfig(new IPConfig(device_.get()));
+  EXPECT_EQ("testname", ipconfig->GetDeviceName());
+}
+
+}  // namespace shill