1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: QT C++ based Class. |
|
15 * Unit Test to StfQtUI's controller and model. |
|
16 * |
|
17 */ |
|
18 #ifndef TESTCONTROLLER_H_ |
|
19 #define TESTCONTROLLER_H_ |
|
20 #include <QtTest/QtTest> |
|
21 #include "istfqtuicontroller.h" |
|
22 #include "istfqtuimodel.h" |
|
23 |
|
24 |
|
25 class testcontroller: public QObject, public IStfEventListener, public IStifModelEventListener |
|
26 { |
|
27 Q_OBJECT |
|
28 private slots: |
|
29 /* operation: |
|
30 * GetModuleList(); |
|
31 * check: |
|
32 * module's number. |
|
33 * */ |
|
34 void T_GetModuleList_ModuleNumber(); |
|
35 /* operation: |
|
36 * GetModuleList(); |
|
37 * check: |
|
38 * module's name. |
|
39 */ |
|
40 void T_GetModuleList_ModuleName(); |
|
41 /*operation: |
|
42 * OpenEngineIniFile(); |
|
43 * GetModuleList(); |
|
44 * check: |
|
45 * module's number. |
|
46 * |
|
47 * */ |
|
48 void T_OpenEngineIniFile_ModuleNumber(); |
|
49 |
|
50 /*operation: |
|
51 * OpenEngineIniFile(); |
|
52 * check: |
|
53 * return value; |
|
54 * */ |
|
55 void T_OpenEngineIniFile(); |
|
56 |
|
57 /*operation: |
|
58 * GetCaseListByModule(); with currect moduleName |
|
59 * check: |
|
60 * case List number. |
|
61 * */ |
|
62 void T_GetCaseListByModule(); |
|
63 |
|
64 /*operation: |
|
65 * GetCase(); |
|
66 *check: |
|
67 * return value of the case. |
|
68 * */ |
|
69 void T_GetCase(); |
|
70 |
|
71 void T_GetSetList(); |
|
72 |
|
73 void T_GetCaseListBySet(); |
|
74 |
|
75 void T_AddCaseToSet(); |
|
76 |
|
77 void T_CreateSet(); |
|
78 |
|
79 void T_DeleteSet(); |
|
80 |
|
81 void T_ShowOutput(); |
|
82 |
|
83 void T_RunCase(); |
|
84 |
|
85 void T_RunSet(); |
|
86 |
|
87 void T_PauseCase_ResumeCase(); |
|
88 |
|
89 void T_AbortCase(); |
|
90 |
|
91 void T_Model_ClearCasesStatus(); |
|
92 |
|
93 void T_Model_AddCaseByStatus_GetCasesByStatus(); |
|
94 |
|
95 void T_Model_AddRunningCase_RemoveRunningCase(); |
|
96 |
|
97 |
|
98 |
|
99 public: |
|
100 testcontroller(); |
|
101 virtual ~testcontroller(); |
|
102 |
|
103 public: //Implement IStfEventListener |
|
104 void OnGetMessage(const QString& aMessage); |
|
105 void OnSetListChanged(); |
|
106 void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg); |
|
107 |
|
108 |
|
109 public: //Implement IStifModelEventListener |
|
110 void OnCaseStatisticChanged() ; |
|
111 void OnRunningCaseChanged() ; |
|
112 |
|
113 |
|
114 private: |
|
115 bool OnSetListChangedFired; |
|
116 bool OnCaseStatisticChangedFired; |
|
117 bool OnRunningCaseChangedFired; |
|
118 |
|
119 private: |
|
120 IStfQtUIController* controller; |
|
121 IStfQtUIModel* model; |
|
122 |
|
123 |
|
124 }; |
|
125 |
|
126 #endif /* TESTCONTROLLER_H_ */ |
|