1 #ifndef ANDROID_PDX_MOCK_SERVICE_DISPATCHER_H_ 2 #define ANDROID_PDX_MOCK_SERVICE_DISPATCHER_H_ 3 4 #include <gmock/gmock.h> 5 #include <pdx/service_dispatcher.h> 6 7 namespace android { 8 namespace pdx { 9 10 class MockServiceDispatcher : public ServiceDispatcher { 11 public: 12 MOCK_METHOD1(AddService, int(const std::shared_ptr<Service>& service)); 13 MOCK_METHOD1(RemoveService, int(const std::shared_ptr<Service>& service)); 14 MOCK_METHOD0(ReceiveAndDispatch, int()); 15 MOCK_METHOD1(ReceiveAndDispatch, int(int timeout)); 16 MOCK_METHOD0(EnterDispatchLoop, int()); 17 MOCK_METHOD1(SetCanceled, void(bool cancel)); 18 MOCK_CONST_METHOD0(IsCanceled, bool()); 19 }; 20 21 } // namespace pdx 22 } // namespace android 23 24 #endif // ANDROID_PDX_MOCK_SERVICE_DISPATCHER_H_ 25