|
1 /* |
|
2 * Copyright (c) 2005-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 * \page pt Test Harness for the certificate store manager |
|
16 * <H2>Testing</H2> |
|
17 * <H3>Test goals</H3> |
|
18 * <P>We want to the entire API for CCertStore and CCertStoreManager. Some other classes |
|
19 * will tested indirectly by these tests i.e. the other classes in certstore.h and the file |
|
20 * certstore implementation.</P> |
|
21 * <P>Test cases</P> |
|
22 * IMPORT_C const RArray<TCertManClientInfo>& Clients() const; |
|
23 * IMPORT_C void GetCACerts(RPointerArray<CCACertStoreEntry>& aEntries, |
|
24 * const TCACertStoreFilter& aFilter, TRequestStatus& aStatus); |
|
25 * IMPORT_C void GetUserCerts(RPointerArray<CUserCertStoreEntry>& aEntries, |
|
26 * const TUserCertStoreFilter& aFilter, TRequestStatus& aStatus); |
|
27 * IMPORT_C TInt StoreCount() const; |
|
28 * IMPORT_C CCertStore& Store(TInt aIndex) const; |
|
29 * <TABLE BORDER1> |
|
30 * <TR> |
|
31 * <TD>1. Opening, initializing and deleting the certificate store manager</TD> |
|
32 * <TD>This series of tests open, initialize and delete the certificate store manager.</TD> |
|
33 * <TD>IMPORT_C static CCertStoreManager* NewL(RFs& aFs, TBool aOpenForWrite);<BR> |
|
34 * IMPORT_C static CCertStoreManager* NewLC(RFs& aFs, TBool aOpenForWrite);<BR> |
|
35 * IMPORT_C ~CCertStoreManager();<BR> |
|
36 * IMPORT_C void Initialise(TRequestStatus& aStatus);<BR></TD> |
|
37 * </TR> |
|
38 * <TR> |
|
39 * <TD>1.1. Opening, initializing and deleting, usual steps.</TD> |
|
40 * </TR> |
|
41 * <TR> |
|
42 * <TD>1.1.1. Creating and initializing the certificate store manager</TD> |
|
43 * </TR> |
|
44 * <TR> |
|
45 * <TD>1.1.2. Deleting the certificate store manager</TD> |
|
46 * </TR> |
|
47 * <TR> |
|
48 * <TD>1.2. Opening, initializing and trying to open another certificate manager</TD> |
|
49 * </TR> |
|
50 * <TR> |
|
51 * <TD>1.2.1. Creating and initializing the certificate store manager</TD> |
|
52 * </TR> |
|
53 * <TR> |
|
54 * <TD>1.2.2. Creating and initializing another certificate store manager</TD> |
|
55 * </TR> |
|
56 * <TR> |
|
57 * <TD>1.2.3. Deleting the certificate store manager</TD> |
|
58 * </TR> |
|
59 * <TR> |
|
60 * <TD>1.2.4. Opening a certificate store manager</TD> |
|
61 * </TR> |
|
62 * <TR> |
|
63 * <TD>1.2.5. Deleting certificate store manager</TD> |
|
64 * </TR> |
|
65 * <TR> |
|
66 * <TD>2. Adding and removing clients</TD> |
|
67 * <TD>IMPORT_C void AddClientL(const TCertManClientInfo& aClient);<BR> |
|
68 * IMPORT_C void RemoveClientL(const TUid& aUid);</TD> |
|
69 * </TD> |
|
70 * </TR> |
|
71 * <TR> |
|
72 * <TD>2.1. Adding and retrieving a client</TD> |
|
73 * </TR> |
|
74 * <TR> |
|
75 * <TD>2.1.1. Initializing the manager</TD> |
|
76 * </TR> |
|
77 * <TR> |
|
78 * <TD>2.1.2. Adding a client</TD> |
|
79 * </TR> |
|
80 * <TR> |
|
81 * <TD>2.1.3. Retrieving the clients</TD> |
|
82 * </TR> |
|
83 * <TR> |
|
84 * <TD>2.1.4. Deleting the client</TD> |
|
85 * </TR> |
|
86 * <TR> |
|
87 * <TD>2.1.5. Deleting the manager</TD> |
|
88 * </TR> |
|
89 * <TR> |
|
90 * <TD>2.2. Adding and retrieving a client, closing the store between the adding and the |
|
91 * retrieving</TD> |
|
92 * </TR> |
|
93 * <TR> |
|
94 * <TD>2.2.1. Initializing the manager</TD> |
|
95 * </TR> |
|
96 * <TR> |
|
97 * <TD>2.2.2. Adding a client</TD> |
|
98 * </TR> |
|
99 * <TR> |
|
100 * <TD>2.2.3. Deleting the manager</TD> |
|
101 * </TR> |
|
102 * <TR> |
|
103 * <TD>2.2.4. Initializing the manager</TD> |
|
104 * </TR> |
|
105 * <TR> |
|
106 * <TD>2.2.5. Retrieving the clients</TD> |
|
107 * </TR> |
|
108 * <TR> |
|
109 * <TD>2.2.6. Deleting the client</TD> |
|
110 * </TR> |
|
111 * <TR> |
|
112 * <TD>2.2.7. Deleting the manager</TD> |
|
113 * </TR> |
|
114 * <TR> |
|
115 * <TD>2.3. Adding and removing 2 clients</TD> |
|
116 * </TR> |
|
117 * <TR> |
|
118 * <TD>2.3.1. Initializing the manager</TD> |
|
119 * </TR> |
|
120 * <TR> |
|
121 * <TD>2.3.2. Adding a client (1001)</TD> |
|
122 * </TR> |
|
123 * <TR> |
|
124 * <TD>2.3.3. Adding a client (1002)</TD> |
|
125 * </TR> |
|
126 * <TR> |
|
127 * <TD>2.3.4. Retrieving the clients</TD> |
|
128 * </TR> |
|
129 * <TR> |
|
130 * <TD>2.3.5. Deleting one of the client (1001)</TD> |
|
131 * </TR> |
|
132 * <TR> |
|
133 * <TD>2.3.6. Retrieving the clients</TD> |
|
134 * </TR> |
|
135 * <TR> |
|
136 * <TD>2.3.7. Deleting one of the client (1002)</TD> |
|
137 * </TR> |
|
138 * <TR> |
|
139 * <TD>2.3.8. Retrieving the clients</TD> |
|
140 * </TR> |
|
141 * <TR> |
|
142 * <TD>2.3.9. Deleting the manager</TD> |
|
143 * </TR> |
|
144 * <TR> |
|
145 * <TD>2.4.1. Initializing the manager</TD> |
|
146 * </TR> |
|
147 * <TR> |
|
148 * <TD>2.4.2. Deleting a client that doesn't exist</TD> |
|
149 * </TR> |
|
150 * <TR> |
|
151 * <TD>2.4.3. Deleting the manager</TD> |
|
152 * </TR> |
|
153 * </TABLE> |
|
154 * <H2>Testing with failures</H2> |
|
155 * <H3>Introduction</H3> |
|
156 * <P>The following test script is meant to test the correct behaviour when errors occur.</P> |
|
157 * <H3>Test goals</H3> |
|
158 * This is a list of specific error conditions we have to test for. |
|
159 * <TABLE BORDER"1"> |
|
160 * <TR> |
|
161 * <TD>Addition of a client</TD><TD>Addition to memory successfull but writing to the store |
|
162 * fails</TD> |
|
163 * </TR> |
|
164 * </TABLE> |
|
165 * <H3>Test cases</H3> |
|
166 * <TABLE BORDER1> |
|
167 * <TR> |
|
168 * <TD>1</TD> |
|
169 * </TR> |
|
170 * </TABLE> |
|
171 * 1) We initialize the store. |
|
172 * 2) We get the clients and make sure there are none. This is to ensure that the test |
|
173 * are meaningfull. |
|
174 * 3) We add a client to the store but we make this operation fail after the memory cache |
|
175 * is updated but before the stream is updated. |
|
176 * 4) We get the clients and make sure that it is still empty. |
|
177 * 5) We close the store manager. |
|
178 * 6) We reopen it. |
|
179 * 7) We get the clients and make sure that it is still empty. |
|
180 * 8) We close the store. |
|
181 * |
|
182 */ |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 /** |
|
189 @file |
|
190 */ |