blob: 4387cfa3f778ef833cbdface6a939b623b3f1224 [file] [log] [blame]
David Rochbergfa1d31d2012-03-20 10:38:07 -04001// Copyright (c) 2012 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#ifndef DBUS_PROPERTY_MATCHERS_H_
5#define DBUS_PROPERTY_MATCHERS_H_
6
7#include <gmock/gmock.h>
8
9#include "shill/dbus_properties.h"
10
11MATCHER_P2(HasDBusPropertyWithValueU32, key, value, "") {
12 shill::DBusPropertiesMap::const_iterator it = arg.find(key);
13 return it != arg.end() && value == it->second.reader().get_uint32();
14}
15
16MATCHER_P2(HasDBusPropertyWithValueI32, key, value, "") {
17 shill::DBusPropertiesMap::const_iterator it = arg.find(key);
18 return it != arg.end() && value == it->second.reader().get_int32();
19}
20
21#endif // DBUS_PROPERTY_MATCHERS_H_