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_ENUMERATE_H_ 6 #define LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_ENUMERATE_H_ 7 8 #include <memory> 9 10 #include <brillo/brillo_export.h> 11 #include <brillo/udev/udev_enumerate.h> 12 #include <gmock/gmock.h> 13 14 namespace brillo { 15 16 class BRILLO_EXPORT MockUdevEnumerate : public UdevEnumerate { 17 public: 18 MockUdevEnumerate() = default; 19 ~MockUdevEnumerate() override = default; 20 21 MOCK_METHOD(bool, AddMatchSubsystem, (const char*), (override)); 22 MOCK_METHOD(bool, AddNoMatchSubsystem, (const char*), (override)); 23 MOCK_METHOD(bool, 24 AddMatchSysAttribute, 25 (const char*, const char*), 26 (override)); 27 MOCK_METHOD(bool, 28 AddNoMatchSysAttribute, 29 (const char*, const char*), 30 (override)); 31 MOCK_METHOD(bool, AddMatchProperty, (const char*, const char*), (override)); 32 MOCK_METHOD(bool, AddMatchSysName, (const char*), (override)); 33 MOCK_METHOD(bool, AddMatchTag, (const char*), (override)); 34 MOCK_METHOD(bool, AddMatchIsInitialized, (), (override)); 35 MOCK_METHOD(bool, AddSysPath, (const char*), (override)); 36 MOCK_METHOD(bool, ScanDevices, (), (override)); 37 MOCK_METHOD(bool, ScanSubsystems, (), (override)); 38 MOCK_METHOD(std::unique_ptr<UdevListEntry>, 39 GetListEntry, 40 (), 41 (const, override)); 42 43 private: 44 DISALLOW_COPY_AND_ASSIGN(MockUdevEnumerate); 45 }; 46 47 } // namespace brillo 48 49 #endif // LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_ENUMERATE_H_ 50