1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 /* |
2 // All rights reserved. |
2 * Copyright (c) 2000-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 <e32std.h> |
19 #include <e32std.h> |
17 #include <e32test.h> |
20 #include <e32test.h> |
18 #include <cntdb.h> |
21 #include <cntdb.h> |
19 #include <cntitem.h> |
22 #include <cntitem.h> |
20 #include <cntfldst.h> |
23 #include <cntfldst.h> |
21 #include "t_utils2.h" |
24 #include "t_utils2.h" |
22 #include "t_groupview.h" |
25 #include "t_groupview.h" |
23 #include "CContactDbEventQueue.h" |
26 #include "ccontactdbeventqueue.h" |
24 |
27 |
25 // Test Macro |
28 // Test Macro |
26 LOCAL_D RTest test(_L("T_GROUPVIEW")); |
29 LOCAL_D RTest test(_L("T_GROUPVIEW")); |
27 |
30 |
28 // |
31 // |
29 // Constants. |
32 // Constants. |
30 // |
33 // |
31 |
34 |
32 _LIT(KTestName,"@SYMTESTCaseID:PIM-T-GROUPVIEW-0001 t_groupview"); |
35 _LIT(KTestName,"t_groupview"); |
33 _LIT(KLogFileName,"t_groupview.log"); |
36 _LIT(KLogFileName,"t_groupview.log"); |
34 |
37 |
35 _LIT(KDbFileName,"c:t_groupview.cdb"); |
38 _LIT(KDbFileName,"c:t_groupview.cdb"); |
36 |
39 |
37 _LIT(KTextDefSeparator,""); |
40 _LIT(KTextDefSeparator,""); |
384 return KErrNone; |
387 return KErrNone; |
385 } |
388 } |
386 |
389 |
387 void CGroupViewTester::HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent) |
390 void CGroupViewTester::HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent) |
388 { |
391 { |
389 //LOGGING// |
392 //LOGGING/////////////////////////////////////////////////////////////////////////////////// |
390 if(&aView == iLocalView) |
393 if(&aView == iLocalView) |
391 test.Printf(_L("LocalView ")); |
394 test.Printf(_L("LocalView ")); |
392 else if(&aView == iGroupViewOne) |
395 else if(&aView == iGroupViewOne) |
393 test.Printf(_L("GroupViewOne ")); |
396 test.Printf(_L("GroupViewOne ")); |
394 else if(&aView == iGroupViewOneByName) |
397 else if(&aView == iGroupViewOneByName) |
431 break; |
434 break; |
432 default: |
435 default: |
433 test.Printf(_L("Er, none of the known event types... ")); |
436 test.Printf(_L("Er, none of the known event types... ")); |
434 break; |
437 break; |
435 } |
438 } |
436 // |
439 //////////////////////////////////////////////////////////////////////////////////////////// |
437 |
440 |
438 switch (iCurrentTest) |
441 switch (iCurrentTest) |
439 { |
442 { |
440 case ECreateLocalView: |
443 case ECreateLocalView: |
441 test(iLocalView==&aView); |
444 test(iLocalView==&aView); |
587 CActiveScheduler::Install(scheduler); |
590 CActiveScheduler::Install(scheduler); |
588 CTrapCleanup* cleanup=CTrapCleanup::New(); |
591 CTrapCleanup* cleanup=CTrapCleanup::New(); |
589 if (cleanup) |
592 if (cleanup) |
590 { |
593 { |
591 CTestConductor* testConductor=NULL; |
594 CTestConductor* testConductor=NULL; |
592 test.Start(KTestName); |
595 test.Start(_L("@SYMTESTCaseID:PIM-T-GROUPVIEW-0001 t_groupview")); |
593 |
596 |
594 TRAPD(err,testConductor=CTestConductor::NewL()); |
597 TRAPD(err,testConductor=CTestConductor::NewL()); |
595 test(err == KErrNone); |
598 test(err == KErrNone); |
596 test.End(); |
599 test.End(); |
597 delete testConductor; |
600 delete testConductor; |