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_LIST_ENTRY_H_ 6 #define LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_LIST_ENTRY_H_ 7 8 #include <memory> 9 10 #include <brillo/brillo_export.h> 11 #include <brillo/udev/udev_list_entry.h> 12 #include <gmock/gmock.h> 13 14 namespace brillo { 15 16 class BRILLO_EXPORT MockUdevListEntry : public UdevListEntry { 17 public: 18 MockUdevListEntry() = default; 19 ~MockUdevListEntry() override = default; 20 21 MOCK_METHOD(std::unique_ptr<UdevListEntry>, GetNext, (), (const, override)); 22 MOCK_METHOD(std::unique_ptr<UdevListEntry>, 23 GetByName, 24 (const char*), 25 (const, override)); 26 MOCK_METHOD(const char*, GetName, (), (const, override)); 27 MOCK_METHOD(const char*, GetValue, (), (const, override)); 28 29 private: 30 DISALLOW_COPY_AND_ASSIGN(MockUdevListEntry); 31 }; 32 33 } // namespace brillo 34 35 #endif // LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_LIST_ENTRY_H_ 36