[shill] the beginnings of the data model
Flesh out Manager a little, to add vectors of Device* and Service* and ways to look through them.
BUG=chromium-os:15347
TEST=unit tests
Change-Id: Iae5280f56bf58cf1580f0b87c465f4905459f07a
Reviewed-on: http://gerrit.chromium.org/gerrit/966
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Chris Masone <cmasone@chromium.org>
diff --git a/mock_device.h b/mock_device.h
new file mode 100644
index 0000000..637f32a
--- /dev/null
+++ b/mock_device.h
@@ -0,0 +1,41 @@
+// 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.
+
+#ifndef SHILL_MOCK_DEVICE_
+#define SHILL_MOCK_DEVICE_
+
+#include <base/memory/ref_counted.h>
+#include <gmock/gmock.h>
+
+#include "shill/device.h"
+
+namespace shill {
+
+class ControlInterface;
+class EventDispatcher;
+
+using ::testing::_;
+using ::testing::Return;
+
+class MockDevice : public Device {
+ public:
+ // A constructor for the Device object
+ MockDevice(ControlInterface *control_interface,
+ EventDispatcher *dispatcher)
+ : Device(control_interface, dispatcher) {
+ ON_CALL(*this, TechnologyIs(_)).WillByDefault(Return(false));
+ }
+ virtual ~MockDevice() {}
+
+ MOCK_METHOD0(Start, void(void));
+ MOCK_METHOD0(Stop, void(void));
+ MOCK_METHOD1(TechnologyIs, bool(Technology));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockDevice);
+};
+
+} // namespace shill
+
+#endif // SHILL_MOCK_DEVICE_