Debian Codegraph @

tests/unit/mock_device.h

raw
1 /*
2 * Copyright (C) 2021 UBports foundation.
3 * Author(s): Marius Gripsgard <[email protected]>
4 *
5 * This program is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License version 3, as published by
7 * the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
11 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 */
18
19 #include <gmock/gmock.h>
20
21 #include "device.h"
22
23 class MockDevice : public Device
24 {
25 public:
26 MOCK_METHOD0(name, std::string());
27 MOCK_METHOD0(prettyName, std::string());
28 MOCK_METHOD0(deviceType, DeviceInfo::DeviceType());
29 MOCK_METHOD0(driverType, DeviceInfo::DriverType());
30
31 MOCK_METHOD0(gridUnit, int());
32
33 MOCK_METHOD2(get, std::string(std::string, std::string));
34 MOCK_METHOD1(contains, bool(std::string));
35 };