blob: 63570032041f1d7bbc25c927ce1fc35e5e4aea63 [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.
Ben Chanc45688b2014-07-02 23:50:45 -07004
5#ifndef SHILL_DBUS_PROPERTY_MATCHERS_H_
6#define SHILL_DBUS_PROPERTY_MATCHERS_H_
David Rochbergfa1d31d2012-03-20 10:38:07 -04007
8#include <gmock/gmock.h>
9
10#include "shill/dbus_properties.h"
11
12MATCHER_P2(HasDBusPropertyWithValueU32, key, value, "") {
13 shill::DBusPropertiesMap::const_iterator it = arg.find(key);
14 return it != arg.end() && value == it->second.reader().get_uint32();
15}
16
17MATCHER_P2(HasDBusPropertyWithValueI32, key, value, "") {
18 shill::DBusPropertiesMap::const_iterator it = arg.find(key);
19 return it != arg.end() && value == it->second.reader().get_int32();
20}
21
Ben Chanc45688b2014-07-02 23:50:45 -070022#endif // SHILL_DBUS_PROPERTY_MATCHERS_H_