1 // Copyright (c) 2006-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_ConnPrefSuite class which is the |
|
15 // container class for the TS_ConnPrefStep derived test steps |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file TS_ConnPrefSuite.cpp |
|
21 */ |
|
22 #include "TS_ConnPrefSuite.h" |
|
23 #include "TS_ConnPrefStep.h" |
|
24 #include "TS_ConnPrefHelperSteps.h" |
|
25 #include "TS_ConnPrefSteps.h" |
|
26 |
|
27 |
|
28 EXPORT_C CTS_ConnPrefSuite* NewTS_ConnPrefSuite( void ) |
|
29 /** Polymorphic interface, exported ordinal 1. Called by scheduletest |
|
30 * and used to instantiate the suite |
|
31 * @return a pointer to the created TS_ConnPrefSuite object |
|
32 */ |
|
33 { |
|
34 CTS_ConnPrefSuite* ts = 0; |
|
35 TRAPD(err,ts = new (ELeave) CTS_ConnPrefSuite); |
|
36 if (err == KErrNone) |
|
37 return ts; |
|
38 return 0; |
|
39 } |
|
40 |
|
41 CTS_ConnPrefSuite::~CTS_ConnPrefSuite() |
|
42 /** |
|
43 * the destructor has to clean up any TConnDetails and TSock Details left hanging around |
|
44 * |
|
45 */ |
|
46 { |
|
47 } |
|
48 |
|
49 void CTS_ConnPrefSuite::AddTestStepL(CTS_ConnPrefStep* ptrTestStep ) |
|
50 /** |
|
51 * adds a test step to the test suite object, using the base class method |
|
52 * @param ptrTestStep - a pointer to the test step to be added |
|
53 */ |
|
54 { |
|
55 CTestSuite::AddTestStepL(ptrTestStep); |
|
56 } |
|
57 |
|
58 void CTS_ConnPrefSuite::InitialiseL( void ) |
|
59 /** |
|
60 * Effective second-phase constructor. Creates all suite test steps |
|
61 * and associates them with the suite. |
|
62 */ |
|
63 { |
|
64 // Helper test steps |
|
65 AddTestStepL(new(ELeave) CTS_ConnPrefForceCCoverWrite(_L("ForceCCoverWrite"))); |
|
66 //Add the test steps for the tests which mainly use the dummy nif |
|
67 AddTestStepL(new(ELeave) CTS_ConstructAndVersion ()); |
|
68 AddTestStepL(new(ELeave) CTS_SetAndGetConnPrefs()); |
|
69 AddTestStepL(new(ELeave) CTS_AssignAndCopyConstruct ()); |
|
70 AddTestStepL(new(ELeave) CTS_ComparePrefs ()); |
|
71 AddTestStepL(new(ELeave) CTS_ExtensionIdAndCast ()); |
|
72 AddTestStepL(new(ELeave) CTS_MultiConnPref ()); |
|
73 AddTestStepL(new(ELeave) CTS_MultiConnPrefVersion ()); |
|
74 AddTestStepL(new(ELeave) CTS_MultiConnectionAttempts ()); |
|
75 |
|
76 } |
|
77 |
|
78 TPtrC CTS_ConnPrefSuite::GetVersion( void ) |
|
79 /** |
|
80 * Give version information back to Schedultest |
|
81 * @return The descriptor of the version |
|
82 */ |
|
83 { |
|
84 return KTxtVersion(); |
|
85 } |
|