|
1 /* |
|
2 * Copyright (c) 2008-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 the License "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: |
|
15 * CTestXmlParser - Used to testing retrieval of data pertianing to creation and updation |
|
16 * of database. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 /** |
|
22 @file |
|
23 @released |
|
24 @internalTechnology |
|
25 */ |
|
26 |
|
27 #ifndef TXMLPARSER_H |
|
28 #define TXMLPARSER_H |
|
29 |
|
30 #include <vector> |
|
31 #include <string> |
|
32 #include "logger.h" |
|
33 #include "xmlparser.h" |
|
34 |
|
35 class CTestXmlParser |
|
36 { |
|
37 public: |
|
38 CTestXmlParser(); |
|
39 ~CTestXmlParser(); |
|
40 TestParser(); |
|
41 |
|
42 private: |
|
43 bool TestValidDbFile(); |
|
44 bool TestDbFileNotPresent(); |
|
45 bool TestEmptyDbFile(); |
|
46 bool TestInvalidDbFiles(); |
|
47 |
|
48 bool TestInvalidRoot(); |
|
49 bool TestEndTagMissing(); |
|
50 bool AgainstDtdSpec(); |
|
51 |
|
52 |
|
53 bool TestValidUpdateDb(); |
|
54 bool TestUpdateFileNotPresent(); |
|
55 bool TestXmlFileNotPresent(); |
|
56 bool TestEmptyUpdateFile(); |
|
57 bool TestInvalidUpdateDb(); |
|
58 |
|
59 bool TestUpdateDbEndTagMissing(); |
|
60 bool TestUpdateDbInvalidRoot(); |
|
61 bool UpdateDbAgainstDtdSpec(); |
|
62 |
|
63 void DisplayDetails(std::vector<std::string>& aDetails); |
|
64 void DisplayDetails(std::vector<CScrXmlParser::TScrEnvironmentDetails>& aEnvDetails); |
|
65 void PrintResult(const char* aMethodName, bool aResult); |
|
66 private: |
|
67 CScrXmlParser* iXmlParser; |
|
68 CLogger* iLogger; |
|
69 static std::string Passed; |
|
70 static std::string Failed; |
|
71 }; |
|
72 |
|
73 |
|
74 |
|
75 #endif // TXMLPARSER_H |