Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/service_mock.h

Issue 6395007: cashew: gmock integration (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cashew.git@master
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/service_manager_mock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/service_mock.h
diff --git a/src/service_mock.h b/src/service_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..157787357ef31a1f8508485b4798786f6a3f7c34
--- /dev/null
+++ b/src/service_mock.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2010, 2011 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 SRC_SERVICE_MOCK_H_
+#define SRC_SERVICE_MOCK_H_
+
+#include <gmock/gmock.h>
+
+#include <string>
+
+#include "src/service.h"
+
+namespace cashew {
+
+class ServiceMock : public Service {
+ public:
+ MOCK_CONST_METHOD0(GetPath, const DBus::Path&());
+ MOCK_CONST_METHOD0(GetState, Service::State());
+ MOCK_CONST_METHOD0(GetType, Service::Type());
+ MOCK_CONST_METHOD0(GetDevice, Device*());
+ MOCK_CONST_METHOD0(GetDBusDataPlans, DBusDataPlanList());
+ MOCK_CONST_METHOD0(IsDefaultService, bool());
+ MOCK_CONST_METHOD0(GetConnectivityState, Service::ConnectivityState());
+ MOCK_METHOD1(OnCarrierUpdate, void(const std::string& carrier));
+ MOCK_METHOD2(OnByteCounterUpdate, void(uint64 rx_bytes, uint64 tx_bytes));
+ MOCK_METHOD1(OnDefaultServiceUpdate, void(bool is_default_service));
+ MOCK_METHOD0(OnFlimflamOnline, void());
+ MOCK_METHOD0(OnFlimflamOffline, void());
+};
+
+} // namespace cashew
+
+#endif // SRC_SERVICE_MOCK_H_
« no previous file with comments | « src/service_manager_mock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698