1 // Copyright (c) 2013 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. 4 5 #ifndef LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_ 6 #define LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_ 7 8 #include <memory> 9 10 #include <brillo/brillo_export.h> 11 #include <brillo/udev/udev_monitor.h> 12 #include <gmock/gmock.h> 13 14 namespace brillo { 15 16 class BRILLO_EXPORT MockUdevMonitor : public UdevMonitor { 17 public: 18 MockUdevMonitor() = default; 19 ~MockUdevMonitor() override = default; 20 21 MOCK_METHOD(bool, EnableReceiving, (), (override)); 22 MOCK_METHOD(int, GetFileDescriptor, (), (const, override)); 23 MOCK_METHOD(std::unique_ptr<UdevDevice>, ReceiveDevice, (), (override)); 24 MOCK_METHOD(bool, 25 FilterAddMatchSubsystemDeviceType, 26 (const char*, const char*), 27 (override)); 28 MOCK_METHOD(bool, FilterAddMatchTag, (const char*), (override)); 29 MOCK_METHOD(bool, FilterUpdate, (), (override)); 30 MOCK_METHOD(bool, FilterRemove, (), (override)); 31 32 private: 33 DISALLOW_COPY_AND_ASSIGN(MockUdevMonitor); 34 }; 35 36 } // namespace brillo 37 38 #endif // LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_ 39