1 /* This file is part of Clementine.
2    Copyright 2010, David Sansome <me@davidsansome.com>
3 
4    Clementine is free software: you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8 
9    Clementine is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with Clementine.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef MOCK_PLAYER_H
19 #define MOCK_PLAYER_H
20 
21 #include "core/player.h"
22 #include "core/song.h"
23 #include "core/settingsprovider.h"
24 #include "library/sqlrow.h"
25 
26 #include <gmock/gmock.h>
27 
28 class MockPlayer : public PlayerInterface {
29 public:
MockPlayer()30   MockPlayer() {}
31 
32   MOCK_CONST_METHOD0(engine, EngineBase*());
33   MOCK_CONST_METHOD0(GetState, Engine::State());
34   MOCK_CONST_METHOD0(GetVolume, int());
35 
36   MOCK_CONST_METHOD0(GetCurrentItem, PlaylistItemPtr());
37   MOCK_CONST_METHOD1(GetItemAt, PlaylistItemPtr(int));
38   MOCK_CONST_METHOD0(playlists, PlaylistManagerInterface*());
39 
40   MOCK_METHOD1(RegisterUrlHandler, void(UrlHandler*));
41   MOCK_METHOD1(UnregisterUrlHandler, void(UrlHandler*));
42 
43   MOCK_METHOD0(ReloadSettings, void());
44 
45   MOCK_METHOD3(PlayAt, void(int, Engine::TrackChangeFlags, bool));
46   MOCK_METHOD0(PlayPause, void());
47 
48   MOCK_METHOD0(Next, void());
49 
50   MOCK_METHOD0(Previous, void());
51   MOCK_METHOD1(SetVolume, void(int));
52   MOCK_METHOD0(VolumeUp, void());
53   MOCK_METHOD0(VolumeDown, void());
54   MOCK_METHOD1(SeekTo, void(int));
55   MOCK_METHOD0(SeekForward, void());
56   MOCK_METHOD0(SeekBackward, void());
57   MOCK_METHOD1(CurrentMetadataChanged, void(const Song&));
58 
59   MOCK_METHOD0(Mute, void());
60   MOCK_METHOD0(Pause, void());
61   MOCK_METHOD0(Stop, void());
62   MOCK_METHOD0(Play, void());
63   MOCK_METHOD0(ShowOSD, void());
64 };
65 
66 #endif // MOCK_PLAYER_H
67