shill: rename DispatchOnType to SetProperty
I think this name is clearer. While the function does
have to dispatch based on type, what the caller is trying
to do is to set a property.
BUG=None
TEST=unit tests
Change-Id: I7eedd5a74de7f465310d07271e61cff320645fd8
Reviewed-on: https://gerrit.chromium.org/gerrit/15538
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
diff --git a/device_unittest.cc b/device_unittest.cc
index 8378f3f..eb26d3a 100644
--- a/device_unittest.cc
+++ b/device_unittest.cc
@@ -105,18 +105,18 @@
}
}
-TEST_F(DeviceTest, Dispatch) {
+TEST_F(DeviceTest, SetProperty) {
::DBus::Error error;
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
- flimflam::kPoweredProperty,
- PropertyStoreTest::kBoolV,
- &error));
+ EXPECT_TRUE(DBusAdaptor::SetProperty(device_->mutable_store(),
+ flimflam::kPoweredProperty,
+ PropertyStoreTest::kBoolV,
+ &error));
// Ensure that an attempt to write a R/O property returns InvalidArgs error.
- EXPECT_FALSE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
- flimflam::kAddressProperty,
- PropertyStoreTest::kStringV,
- &error));
+ EXPECT_FALSE(DBusAdaptor::SetProperty(device_->mutable_store(),
+ flimflam::kAddressProperty,
+ PropertyStoreTest::kStringV,
+ &error));
EXPECT_EQ(invalid_args(), error.name());
}
@@ -124,10 +124,10 @@
::DBus::Error error;
EXPECT_TRUE(device_->powered());
- EXPECT_TRUE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
- flimflam::kPoweredProperty,
- PropertyStoreTest::kBoolV,
- &error));
+ EXPECT_TRUE(DBusAdaptor::SetProperty(device_->mutable_store(),
+ flimflam::kPoweredProperty,
+ PropertyStoreTest::kBoolV,
+ &error));
EXPECT_FALSE(device_->powered());
EXPECT_TRUE(DBusAdaptor::ClearProperty(device_->mutable_store(),
@@ -138,18 +138,18 @@
TEST_F(DeviceTest, ClearReadOnlyProperty) {
::DBus::Error error;
- EXPECT_FALSE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
- flimflam::kAddressProperty,
- PropertyStoreTest::kStringV,
- &error));
+ EXPECT_FALSE(DBusAdaptor::SetProperty(device_->mutable_store(),
+ flimflam::kAddressProperty,
+ PropertyStoreTest::kStringV,
+ &error));
}
TEST_F(DeviceTest, ClearReadOnlyDerivedProperty) {
::DBus::Error error;
- EXPECT_FALSE(DBusAdaptor::DispatchOnType(device_->mutable_store(),
- flimflam::kIPConfigsProperty,
- PropertyStoreTest::kStringsV,
- &error));
+ EXPECT_FALSE(DBusAdaptor::SetProperty(device_->mutable_store(),
+ flimflam::kIPConfigsProperty,
+ PropertyStoreTest::kStringsV,
+ &error));
}
TEST_F(DeviceTest, TechnologyIs) {