equal
deleted
inserted
replaced
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 /* |
2 // All rights reserved. |
2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 // This component and the accompanying materials are made available |
3 * All rights reserved. |
4 // under the terms of "Eclipse Public License v1.0" |
4 * This component and the accompanying materials are made available |
5 // which accompanies this distribution, and is available |
5 * under the terms of "Eclipse Public License v1.0" |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 * which accompanies this distribution, and is available |
7 // |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 // Initial Contributors: |
8 * |
9 // Nokia Corporation - initial contribution. |
9 * Initial Contributors: |
10 // |
10 * Nokia Corporation - initial contribution. |
11 // Contributors: |
11 * |
12 // |
12 * Contributors: |
13 // Description: |
13 * |
14 // |
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
15 |
18 |
16 #include <e32test.h> |
19 #include <e32test.h> |
17 #include "T_rndutils.h" |
20 #include "t_rndutils.h" |
18 #include "t_agent.h" |
21 #include "t_agent.h" |
19 #include <cntitem.h> |
22 #include <cntitem.h> |
20 #include <cntfldst.h> |
23 #include <cntfldst.h> |
21 #include <cntdef.h> |
24 #include <cntdef.h> |
22 _LIT(KAgentExported, "C:\\Agentcontact.vcf"); |
25 _LIT(KAgentExported, "C:\\Agentcontact.vcf"); |
251 2.All Agents should be properly imported, creating new agents and adding them to Main contact items. |
254 2.All Agents should be properly imported, creating new agents and adding them to Main contact items. |
252 3.No leaves or panics should occur |
255 3.No leaves or panics should occur |
253 */ |
256 */ |
254 void CAgentTest::ImportAgentToEmptyDatabaseL() |
257 void CAgentTest::ImportAgentToEmptyDatabaseL() |
255 { |
258 { |
256 _LIT(KAgentFirstName,"Example1"); |
259 _LIT(KAgentFirstName,"AgentSmith"); |
257 iDb = iTest.CreateDatabaseL(); |
260 iDb = iTest.CreateDatabaseL(); |
258 //vCard has contact A, contact B. contact A included in contact B as Agent. |
261 //vCard has contact A, contact B. contact A included in contact B as Agent. |
259 //Agent Contact in B has different Name property. so after merge, contact A should |
262 //Agent Contact in B has different Name property. so after merge, contact A should |
260 //have the name present in Agent A. (look at the vCard in header file). |
263 //have the name present in Agent A. (look at the vCard in header file). |
261 ImportContactsFromDescriptorL(KAgentvCard()); |
264 ImportContactsFromDescriptorL(KAgentvCard()); |
478 CTestRegister* TempFiles = CTestRegister::NewLC(); |
481 CTestRegister* TempFiles = CTestRegister::NewLC(); |
479 TempFiles->RegisterL(KAgentExported); |
482 TempFiles->RegisterL(KAgentExported); |
480 |
483 |
481 iDb = iTest.CreateDatabaseL(); |
484 iDb = iTest.CreateDatabaseL(); |
482 ImportContactsFromDescriptorL(KMultipleAgentvCard()); |
485 ImportContactsFromDescriptorL(KMultipleAgentvCard()); |
483 _LIT(KAgent1FirstName,"SymbianFoundation"); |
486 _LIT(KAgent1FirstName,"Oracle"); |
484 _LIT(KAgent2FirstName,"Architect"); |
487 _LIT(KAgent2FirstName,"Architect"); |
485 |
488 |
486 //remove the other contact item as the imported vacrd contains two contact items. |
489 //remove the other contact item as the imported vacrd contains two contact items. |
487 iIdArray->Remove(0); |
490 iIdArray->Remove(0); |
488 iIdArray->Remove(0); |
491 iIdArray->Remove(0); |