First version Map implementation of database handler with unit tests ( ticket 38 )
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / test / AmRouterTest / CAmRouterTest.h
1 /**
2  * Copyright (C) 2012, BMW AG
3  *
4  * This file is part of GENIVI Project AudioManager.
5  *
6  * Contributions are licensed to the GENIVI Alliance under one or more
7  * Contribution License Agreements.
8  *
9  * \copyright
10  * This Source Code Form is subject to the terms of the
11  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
12  * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13  *
14  *
15 * \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
16  *
17  * For further information see http://www.genivi.org/.
18  *
19  */
20
21 #ifndef DATABASETEST_H_
22 #define DATABASETEST_H_
23
24 #define UNIT_TEST 1
25
26 #include "gtest/gtest.h"
27 #include "gmock/gmock.h"
28
29 #include <algorithm>
30 #include <string>
31 #include <vector>
32 #include <set>
33 #ifdef WITH_DATABASE_STORAGE
34    #include "CAmDatabaseHandler.h"
35 #else
36     #include "CAmMapHandler.h"
37 #endif
38 #include "CAmControlReceiver.h"
39 #include "CAmControlSender.h"
40 #include "CAmDatabaseObserver.h"
41 #include "CAmRoutingSender.h"
42 #include "CAmRouter.h"
43 #include "shared/CAmSocketHandler.h"
44 #include "../IAmControlBackdoor.h"
45 #include "../IAmCommandBackdoor.h"
46 #include "../CAmCommonFunctions.h"
47 #include "../MockIAmControlSend.h"
48 #include "../MockIAmCommandSend.h"
49
50
51 namespace am
52 {
53
54 class CAmRouterTest: public ::testing::Test
55 {
56 public:
57     CAmRouterTest();
58     ~CAmRouterTest();
59     std::vector<std::string> plistRoutingPluginDirs;
60     std::vector<std::string> plistCommandPluginDirs;
61     CAmSocketHandler pSocketHandler;
62     CAmControlSender pControlSender;
63 #ifdef WITH_DATABASE_STORAGE
64     CAmDatabaseHandler pDatabaseHandler;
65 #else
66     CAmMapHandler pDatabaseHandler;
67 #endif
68     CAmRouter pRouter;
69     CAmRoutingSender pRoutingSender;
70     CAmCommandSender pCommandSender;
71     MockIAmCommandSend pMockInterface;
72     MockIAmControlSend pMockControlInterface;
73     IAmRoutingBackdoor pRoutingInterfaceBackdoor;
74     IAmCommandBackdoor pCommandInterfaceBackdoor;
75     IAmControlBackdoor pControlInterfaceBackdoor;
76     CAmControlReceiver pControlReceiver;
77     CAmDatabaseObserver pObserver;
78     CAmCommonFunctions pCF;
79     void SetUp();
80     void TearDown();
81
82     void createMainConnectionSetup();
83 };
84
85 }
86
87 #endif /* DATABASETEST_H_ */