Chris Masone | b925cc8 | 2011-06-22 15:39:57 -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/property_store_unittest.h" |
| 6 | |
| 7 | #include <map> |
| 8 | #include <string> |
| 9 | #include <vector> |
| 10 | |
| 11 | #include <dbus-c++/dbus.h> |
| 12 | #include <gtest/gtest.h> |
| 13 | #include <gmock/gmock.h> |
| 14 | |
| 15 | #include "shill/dbus_adaptor.h" |
| 16 | #include "shill/error.h" |
| 17 | #include "shill/manager.h" |
| 18 | #include "shill/mock_control.h" |
| 19 | #include "shill/property_store.h" |
| 20 | #include "shill/shill_event.h" |
| 21 | |
| 22 | using std::string; |
| 23 | using std::map; |
| 24 | using std::vector; |
| 25 | |
| 26 | namespace shill { |
| 27 | |
| 28 | // static |
| 29 | const ::DBus::Variant PropertyStoreTest::kBoolV = DBusAdaptor::BoolToVariant(0); |
| 30 | // static |
| 31 | const ::DBus::Variant PropertyStoreTest::kByteV = DBusAdaptor::ByteToVariant(0); |
| 32 | // static |
| 33 | const ::DBus::Variant PropertyStoreTest::kInt16V = |
| 34 | DBusAdaptor::Int16ToVariant(0); |
| 35 | // static |
| 36 | const ::DBus::Variant PropertyStoreTest::kInt32V = |
| 37 | DBusAdaptor::Int32ToVariant(0); |
| 38 | // static |
| 39 | const ::DBus::Variant PropertyStoreTest::kStringV = |
| 40 | DBusAdaptor::StringToVariant(""); |
| 41 | // static |
| 42 | const ::DBus::Variant PropertyStoreTest::kStringmapV = |
| 43 | DBusAdaptor::StringmapToVariant(map<string, string>()); |
| 44 | // static |
| 45 | const ::DBus::Variant PropertyStoreTest::kStringmapsV = |
| 46 | DBusAdaptor::StringmapsToVariant(vector<map<string, string> >()); |
| 47 | // static |
| 48 | const ::DBus::Variant PropertyStoreTest::kStringsV = |
| 49 | DBusAdaptor::StringsToVariant(vector<string>(1, "")); |
| 50 | // static |
| 51 | const ::DBus::Variant PropertyStoreTest::kUint16V = |
| 52 | DBusAdaptor::Uint16ToVariant(0); |
| 53 | // static |
| 54 | const ::DBus::Variant PropertyStoreTest::kUint32V = |
| 55 | DBusAdaptor::Uint32ToVariant(0); |
| 56 | |
| 57 | PropertyStoreTest::PropertyStoreTest() |
| 58 | : manager_(&control_interface_, &dispatcher_), |
| 59 | invalid_args_(Error::kErrorNames[Error::kInvalidArguments]), |
| 60 | invalid_prop_(Error::kErrorNames[Error::kInvalidProperty]) { |
| 61 | } |
| 62 | |
| 63 | PropertyStoreTest::~PropertyStoreTest() {} |
| 64 | |
| 65 | } // namespace shill |