1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This defines the TS_UseCasesSuite class which is the |
|
15 // container class for the CTS_UseCasesStep derived test steps |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file TS_UseCasesSuite.cpp |
|
21 */ |
|
22 #include "TS_UseCasesSuite.h" |
|
23 #include "TS_UseCasesStep.h" |
|
24 #include "TS_UseCasesSteps.h" |
|
25 |
|
26 |
|
27 EXPORT_C CTS_UseCasesSuite* NewTS_ConnPrefSuite( void ) |
|
28 /** Polymorphic interface, exported ordinal 1. Called by scheduletest |
|
29 * and used to instantiate the suite |
|
30 * @return a pointer to the created TS_ConnPrefSuite object |
|
31 */ |
|
32 { |
|
33 CTS_UseCasesSuite* ts = 0; |
|
34 TRAPD(err,ts = new (ELeave) CTS_UseCasesSuite); |
|
35 if (err == KErrNone) |
|
36 return ts; |
|
37 return 0; |
|
38 } |
|
39 |
|
40 CTS_UseCasesSuite::~CTS_UseCasesSuite() |
|
41 /** |
|
42 * the destructor has to clean up any TConnDetails and TSock Details left hanging around |
|
43 * |
|
44 */ |
|
45 { |
|
46 } |
|
47 |
|
48 void CTS_UseCasesSuite::AddTestStepL(CTS_UseCasesStep* ptrTestStep ) |
|
49 /** |
|
50 * adds a test step to the test suite object, using the base class method |
|
51 * @param ptrTestStep - a pointer to the test step to be added |
|
52 */ |
|
53 { |
|
54 CTestSuite::AddTestStepL(ptrTestStep); |
|
55 } |
|
56 |
|
57 void CTS_UseCasesSuite::InitialiseL( void ) |
|
58 /** |
|
59 * Effective second-phase constructor. Creates all suite test steps |
|
60 * and associates them with the suite. |
|
61 */ |
|
62 { |
|
63 |
|
64 // Add the test steps for the tests which mainly use the dummy nif |
|
65 AddTestStepL(new(ELeave) CTS_CreatingDatabaseAndView ()); |
|
66 AddTestStepL(new(ELeave) CTS_UsecaseReading ()); |
|
67 AddTestStepL(new(ELeave) CTS_UsecaseWriting ()); |
|
68 AddTestStepL(new(ELeave) CTS_UsecaseOverridingATableEntry ()); |
|
69 AddTestStepL(new(ELeave) CTS_UsecaseOverridingThePreferenceTable ()); |
|
70 AddTestStepL(new(ELeave) CTS_UsecaseUsingATemplate ()); |
|
71 |
|
72 |
|
73 } |
|
74 |
|
75 TPtrC CTS_UseCasesSuite::GetVersion( void ) |
|
76 /** |
|
77 * Give version information back to Schedultest |
|
78 * @return The descriptor of the version |
|
79 */ |
|
80 { |
|
81 return KTxtVersion(); |
|
82 } |
|