summaryrefslogtreecommitdiffstats
path: root/tests/modules/common/mock_mirsurfaceitem.h
blob: 84409bfd4d582e9276e27fd9e292c30f078dd215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Copyright (C) 2015 Canonical, Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License version 3, as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef MOCK_QTMIR_MIRSURFACEITEM_H
#define MOCK_QTMIR_MIRSURFACEITEM_H

#include <Unity/Application/mirsurfaceiteminterface.h>
#include <gmock/gmock.h>

namespace qtmir {

class MockMirSurfaceItem : public MirSurfaceItemInterface {
public:
    MockMirSurfaceItem(QQuickItem *parent = nullptr) : MirSurfaceItemInterface(parent) {}

    MOCK_CONST_METHOD0(type, Type());
    MOCK_CONST_METHOD0(state, State());
    MOCK_CONST_METHOD0(name, QString());
    MOCK_CONST_METHOD0(live, bool());
    MOCK_CONST_METHOD0(orientationAngle, OrientationAngle());
    MOCK_CONST_METHOD0(session, SessionInterface*());

    MOCK_METHOD0(release, void());

    MOCK_METHOD0(stopFrameDropper, void());
    MOCK_METHOD0(startFrameDropper, void());

    MOCK_CONST_METHOD0(isFirstFrameDrawn, bool());

    MOCK_METHOD1(setOrientationAngle, void(OrientationAngle angle));
    MOCK_METHOD1(setSession, void(SessionInterface *app));
};

} // namespace qtmir

#endif // MOCK_QTMIR_MIRSURFACEITEM_H