17199118ec19e09c34b9e5aaa66dfc15dc147734
[profile/ivi/layer-management.git] / LayerManagerPlugins / Communicators / GenericCommunicator / test / mock_CommandExecutor.h
1 /***************************************************************************
2 *
3 * Copyright 2010,2011 BMW Car IT GmbH
4 *
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 *        http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 ****************************************************************************/
19
20 #ifndef MockCommandExecutor_H_
21 #define MockCommandExecutor_H_
22
23 #include "GraphicalSurface.h"
24 #include "ICommand.h"
25 #include "ICommandExecutor.h"
26 #include "Configuration.h"
27 #include <list>
28 #include <gmock/gmock.h>  // Brings in Google Mock.
29 using ::testing::DefaultValue;
30 class MockCommandExecutor : public ICommandExecutor {
31  public:
32   MOCK_METHOD1(execute, bool(ICommand* commandToBeExecuted));
33
34   MOCK_METHOD0(startManagement, bool());
35   MOCK_METHOD0(stopManagement, bool());
36
37   MOCK_METHOD0(getScene, Scene*());
38
39   MOCK_METHOD0(getRendererList, RendererList*());
40   MOCK_METHOD1(addRenderer, void(IRenderer* renderer));
41   MOCK_METHOD1(removeRenderer, void(IRenderer* renderer));
42
43   MOCK_METHOD0(getCommunicatorList, CommunicatorList*());
44   MOCK_METHOD1(addCommunicator, void(ICommunicator* renderer));
45   MOCK_METHOD1(removeCommunicator, void(ICommunicator* renderer));
46
47   MOCK_METHOD0(getSceneProviderList, SceneProviderList*());
48   MOCK_METHOD1(addSceneProvider, void(ISceneProvider* provider));
49   MOCK_METHOD1(removeSceneProvider, void(ISceneProvider* provider));
50
51   MOCK_METHOD0(getApplicationReferenceMap, ApplicationReferenceMap*());
52   MOCK_METHOD2(addApplicationReference, void(t_ilm_client_handle client, IApplicationReference* reference));
53   MOCK_METHOD1(removeApplicationReference, void(t_ilm_client_handle client));
54   MOCK_METHOD1(getSenderPid, t_ilm_uint(t_ilm_client_handle client));
55   MOCK_METHOD1(getSenderName, const char*(t_ilm_client_handle client));
56   MOCK_METHOD1(getSenderName, const char*(unsigned int pid));
57
58   MOCK_CONST_METHOD1(getLayerTypeCapabilities, uint(LayerType));
59   MOCK_CONST_METHOD1(getNumberOfHardwareLayers, uint(uint));
60   MOCK_CONST_METHOD1(getScreenResolution, uint*(uint));
61   MOCK_CONST_METHOD1(getScreenIDs, uint*(uint*));
62
63   MOCK_METHOD2(addClientNotification, void(GraphicalObject* object, t_ilm_notification_mask mask));
64   MOCK_METHOD0(getClientNotificationQueue, NotificationQueue&());
65
66   MOCK_METHOD0(getHealth, HealthCondition());
67 };
68
69 #endif /* MockCommandExecutor_H_ */