From e499e674b043597f1f05ce1bd070241014a884a3 Mon Sep 17 00:00:00 2001 From: "stevenjb@chromium.org" Date: Wed, 10 Jul 2013 18:51:24 +0000 Subject: Add support for Service.SetProperties BUG=258633 R=satorux@chromium.org Review URL: https://codereview.chromium.org/18619006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210899 0039d316-1c4b-4281-b951-d872f2087c98 --- chromeos/dbus/shill_service_client_unittest.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'chromeos/dbus/shill_service_client_unittest.cc') diff --git a/chromeos/dbus/shill_service_client_unittest.cc b/chromeos/dbus/shill_service_client_unittest.cc index d4d3bd7..3d5649f 100644 --- a/chromeos/dbus/shill_service_client_unittest.cc +++ b/chromeos/dbus/shill_service_client_unittest.cc @@ -138,6 +138,30 @@ TEST_F(ShillServiceClientTest, SetProperty) { message_loop_.RunUntilIdle(); } +TEST_F(ShillServiceClientTest, SetProperties) { + // Create response. + scoped_ptr response(dbus::Response::CreateEmpty()); + + // Set expectations. + scoped_ptr arg(CreateExampleServiceProperties()); + PrepareForMethodCall(shill::kSetPropertiesFunction, + base::Bind(&ExpectDictionaryValueArgument, arg.get()), + response.get()); + + // Call method. + MockClosure mock_closure; + MockErrorCallback mock_error_callback; + client_->SetProperties(dbus::ObjectPath(kExampleServicePath), + *arg, + mock_closure.GetCallback(), + mock_error_callback.GetCallback()); + EXPECT_CALL(mock_closure, Run()).Times(1); + EXPECT_CALL(mock_error_callback, Run(_, _)).Times(0); + + // Run the message loop. + message_loop_.RunUntilIdle(); +} + TEST_F(ShillServiceClientTest, ClearProperty) { // Create response. scoped_ptr response(dbus::Response::CreateEmpty()); -- cgit v1.1