1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "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". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file T_TestUniTEF.cpp |
|
22 */ |
|
23 |
|
24 #include "ctestsuitea.h" |
|
25 #include "ctestsuited.h" |
|
26 #include "ctestsuiteassert.h" |
|
27 #include "ctestasyncsuiteassert.h" |
|
28 #include "samplestep.h" |
|
29 |
|
30 _LIT( KServerName, "TEFUnitTE" ); |
|
31 |
|
32 |
|
33 GLDEF_C const TTestName ServerName() |
|
34 /** |
|
35 * ServerName |
|
36 * |
|
37 * @return - The TEF server name |
|
38 */ |
|
39 { |
|
40 TTestName serverName(KServerName); |
|
41 return serverName; |
|
42 } |
|
43 |
|
44 GLDEF_C CTestSuite* CreateTestSuiteL() |
|
45 /** |
|
46 * CreateTestSuiteL |
|
47 * |
|
48 * Test Suite Hirarchy |
|
49 * |
|
50 * TEFUnitSuite--------------------------------- |
|
51 * / \ \ \ |
|
52 * SuiteA SuiteD SuiteAssert AsyncSuiteAssert |
|
53 * / | \ / | \ |
|
54 * SuiteD One Two One Two AsyncSuiteA |
|
55 * / \ / \ |
|
56 * One Two One Two |
|
57 * |
|
58 * @return - The top level suite |
|
59 */ |
|
60 { |
|
61 START_SUITE |
|
62 ADD_TEST_SUITE( CTestSuiteA ) |
|
63 ADD_TEST_SUITE( CTestSuiteD ) |
|
64 ADD_TEST_SUITE( CTestSuiteAssert ) |
|
65 ADD_TEST_SUITE( CTestAsyncSuiteAssert ) |
|
66 END_SUITE |
|
67 } |
|
68 |
|
69 GLDEF_C CTestStep* CreateTEFTestStep(const TDesC& aStepName, CTEFUnitServer& aServer) |
|
70 { |
|
71 // Initialise test step object to NULL if no TEF steps are assigned |
|
72 CTestStep* testStep = NULL; |
|
73 if(aStepName == KSampleStep1) |
|
74 testStep = new CSampleStep1(); |
|
75 else if(aStepName == KSampleStep2) |
|
76 testStep = new CSampleStep2(aServer); |
|
77 else if(aStepName == KSampleStep3) |
|
78 testStep = new CSampleStep3(aServer); |
|
79 return testStep; |
|
80 } |
|