Split Modem into ModemClassic and Modem1
Along the way:
Restructure ModemManagerXxx to use the split modem classes.
Add new mocks to limit scope of modem tests
Change modem state enum to a neutral format and convert from MM1 and
MMClassic to this format.
Fix a bug where we weren't properly releasing a callback in
DBusObjectManagerProxy.
Add new DBus property matchers
BUG=chromium-os:27935,chromium-os:27936
TEST=unit tests
Change-Id: Ib78c7dfd9e30fe556f09a4427fd71c9d785210c9
Reviewed-on: https://gerrit.chromium.org/gerrit/19228
Commit-Ready: David Rochberg <rochberg@chromium.org>
Reviewed-by: David Rochberg <rochberg@chromium.org>
Tested-by: David Rochberg <rochberg@chromium.org>
diff --git a/dbus_property_matchers.h b/dbus_property_matchers.h
new file mode 100644
index 0000000..4387cfa
--- /dev/null
+++ b/dbus_property_matchers.h
@@ -0,0 +1,21 @@
+// Copyright (c) 2012 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 DBUS_PROPERTY_MATCHERS_H_
+#define DBUS_PROPERTY_MATCHERS_H_
+
+#include <gmock/gmock.h>
+
+#include "shill/dbus_properties.h"
+
+MATCHER_P2(HasDBusPropertyWithValueU32, key, value, "") {
+ shill::DBusPropertiesMap::const_iterator it = arg.find(key);
+ return it != arg.end() && value == it->second.reader().get_uint32();
+}
+
+MATCHER_P2(HasDBusPropertyWithValueI32, key, value, "") {
+ shill::DBusPropertiesMap::const_iterator it = arg.find(key);
+ return it != arg.end() && value == it->second.reader().get_int32();
+}
+
+#endif // DBUS_PROPERTY_MATCHERS_H_