|
1 // Copyright (c) 1997-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 // |
|
15 |
|
16 #include <e32uid.h> |
|
17 |
|
18 #include "TestUtilities.h" // For __FILE__LINE__ |
|
19 #include "MagicTest.h" |
|
20 #include "MagicUnitTests.h" |
|
21 |
|
22 LOCAL_D RTest test(_L("MagicTest.cpp")); |
|
23 |
|
24 CExampleInterface_ComponentTester::CExampleInterface_ComponentTester(CDataLogger& aDataLogger, |
|
25 MComponentTestObserver& aObserver) |
|
26 : CComponentTester(aDataLogger, aObserver) |
|
27 { |
|
28 } |
|
29 |
|
30 CExampleInterface_ComponentTester* CExampleInterface_ComponentTester::NewLC(CDataLogger& aDataLogger, MComponentTestObserver& aObserver) |
|
31 { |
|
32 CExampleInterface_ComponentTester* self = new (ELeave) CExampleInterface_ComponentTester(aDataLogger, aObserver); |
|
33 CleanupStack::PushL(self); |
|
34 self->ConstructL(); |
|
35 return self; |
|
36 } |
|
37 |
|
38 /** |
|
39 @SYMTestCaseID SYSLIB-ECOM-CT-0775 |
|
40 @SYMTestCaseDesc Tests for implementations of CExampleInterface class |
|
41 @SYMTestPriority High |
|
42 @SYMTestActions Unit tests for CExampleInterface class |
|
43 @SYMTestExpectedResults Test must not fail |
|
44 @SYMREQ REQ0000 |
|
45 */ |
|
46 void CExampleInterface_ComponentTester::ConstructL() |
|
47 { |
|
48 ComponentTesterConstructL(); |
|
49 AddUnitTestL(CExampleInterfaceCreateAndDestroyUnitTest::NewL(iDataLogger, *this)); |
|
50 AddUnitTestL(CExampleInterface_ListImplementations_UnitTest::NewL(iDataLogger, *this)); |
|
51 AddUnitTestL(CExampleInterfaceAltCreateAndDestroyUnitTest::NewL(iDataLogger, *this)); |
|
52 AddUnitTestL(CExampleInterface_DefectHAN4WZHSY_UnitTest::NewL(iDataLogger, *this)); |
|
53 AddUnitTestL(CExampleInterface_DefectCUO4YCEUE_UnitTest::NewL(iDataLogger, *this)); |
|
54 AddUnitTestL(CExampleInterface_DefectEVS4Z9BPG_UnitTest::NewL(iDataLogger, *this)); |
|
55 AddUnitTestL(CExampleInterface_DefectKRN53SL4Q_UnitTest::NewL(iDataLogger, *this)); |
|
56 } |
|
57 |
|
58 EXPORT_C CComponentTester* NewComponentTestLC(CDataLogger& aDataLogger, |
|
59 MComponentTestObserver& aComponentTestObserver) |
|
60 { |
|
61 return CExampleInterface_ComponentTester::NewLC(aDataLogger, aComponentTestObserver); |
|
62 } |
|
63 |
|
64 // ___________________________________________________________________________ |
|
65 // |
|
66 // This section of the module simply includes the exported test harness template which |
|
67 // makes this a "whole" CPP file with a E32Main entry point below. The test MMP |
|
68 // project file can then produce a EXE for the test project instead of a DLL. |
|
69 |
|
70 #include <ecom/test_bed/testharnesstemplate.h> |
|
71 |
|
72 GLDEF_C TInt E32Main() |
|
73 { |
|
74 test.Title(); |
|
75 test.Start(_L(" @SYMTestCaseID:SYSLIB-ECOM-CT-0775 ")); |
|
76 test.End(); |
|
77 test.Close(); |
|
78 |
|
79 return E32Main_TestHarness(NewComponentTestLC); |
|
80 } |
|
81 |