First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * \page pt Test Harness for the certificate store manager
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>
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;
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>
39 * <TD>1.1. Opening, initializing and deleting, usual steps.</TD>
42 * <TD>1.1.1. Creating and initializing the certificate store manager</TD>
45 * <TD>1.1.2. Deleting the certificate store manager</TD>
48 * <TD>1.2. Opening, initializing and trying to open another certificate manager</TD>
51 * <TD>1.2.1. Creating and initializing the certificate store manager</TD>
54 * <TD>1.2.2. Creating and initializing another certificate store manager</TD>
57 * <TD>1.2.3. Deleting the certificate store manager</TD>
60 * <TD>1.2.4. Opening a certificate store manager</TD>
63 * <TD>1.2.5. Deleting certificate store manager</TD>
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>
72 * <TD>2.1. Adding and retrieving a client</TD>
75 * <TD>2.1.1. Initializing the manager</TD>
78 * <TD>2.1.2. Adding a client</TD>
81 * <TD>2.1.3. Retrieving the clients</TD>
84 * <TD>2.1.4. Deleting the client</TD>
87 * <TD>2.1.5. Deleting the manager</TD>
90 * <TD>2.2. Adding and retrieving a client, closing the store between the adding and the
94 * <TD>2.2.1. Initializing the manager</TD>
97 * <TD>2.2.2. Adding a client</TD>
100 * <TD>2.2.3. Deleting the manager</TD>
103 * <TD>2.2.4. Initializing the manager</TD>
106 * <TD>2.2.5. Retrieving the clients</TD>
109 * <TD>2.2.6. Deleting the client</TD>
112 * <TD>2.2.7. Deleting the manager</TD>
115 * <TD>2.3. Adding and removing 2 clients</TD>
118 * <TD>2.3.1. Initializing the manager</TD>
121 * <TD>2.3.2. Adding a client (1001)</TD>
124 * <TD>2.3.3. Adding a client (1002)</TD>
127 * <TD>2.3.4. Retrieving the clients</TD>
130 * <TD>2.3.5. Deleting one of the client (1001)</TD>
133 * <TD>2.3.6. Retrieving the clients</TD>
136 * <TD>2.3.7. Deleting one of the client (1002)</TD>
139 * <TD>2.3.8. Retrieving the clients</TD>
142 * <TD>2.3.9. Deleting the manager</TD>
145 * <TD>2.4.1. Initializing the manager</TD>
148 * <TD>2.4.2. Deleting a client that doesn't exist</TD>
151 * <TD>2.4.3. Deleting the manager</TD>
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.
161 * <TD>Addition of a client</TD><TD>Addition to memory successfull but writing to the store
165 * <H3>Test cases</H3>
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
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.
179 * 7) We get the clients and make sure that it is still empty.
180 * 8) We close the store.