You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
4 months ago
|
// Copyright (c) 2013 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 LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_
|
||
|
#define LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_
|
||
|
|
||
|
#include <memory>
|
||
|
|
||
|
#include <brillo/brillo_export.h>
|
||
|
#include <brillo/udev/udev_monitor.h>
|
||
|
#include <gmock/gmock.h>
|
||
|
|
||
|
namespace brillo {
|
||
|
|
||
|
class BRILLO_EXPORT MockUdevMonitor : public UdevMonitor {
|
||
|
public:
|
||
|
MockUdevMonitor() = default;
|
||
|
~MockUdevMonitor() override = default;
|
||
|
|
||
|
MOCK_METHOD(bool, EnableReceiving, (), (override));
|
||
|
MOCK_METHOD(int, GetFileDescriptor, (), (const, override));
|
||
|
MOCK_METHOD(std::unique_ptr<UdevDevice>, ReceiveDevice, (), (override));
|
||
|
MOCK_METHOD(bool,
|
||
|
FilterAddMatchSubsystemDeviceType,
|
||
|
(const char*, const char*),
|
||
|
(override));
|
||
|
MOCK_METHOD(bool, FilterAddMatchTag, (const char*), (override));
|
||
|
MOCK_METHOD(bool, FilterUpdate, (), (override));
|
||
|
MOCK_METHOD(bool, FilterRemove, (), (override));
|
||
|
|
||
|
private:
|
||
|
DISALLOW_COPY_AND_ASSIGN(MockUdevMonitor);
|
||
|
};
|
||
|
|
||
|
} // namespace brillo
|
||
|
|
||
|
#endif // LIBBRILLO_BRILLO_UDEV_MOCK_UDEV_MONITOR_H_
|