Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This file contains the definitions for
15 // the transition classes for testing the
16 // CExampleInterface class.
20 #ifndef __MAGICTRANSITION_H__
21 #define __MAGICTRANSITION_H__
23 #include <ecom/test_bed/transition.h>
24 #include "LeakTestTransition.h"
25 #include "Interface.h"
27 class CExampleInterface;
29 #define CTransitionType CLeakTestTransition
31 // ______________________________________________________________________________
34 Comments : The context in which the transitions will run
35 That is to say the container in which the transition
36 parameters are passed around
38 class CExampleInterface_UnitTestContext : public CUnitTestContext
41 inline CExampleInterface_UnitTestContext(CDataLogger& aDataLogger,
42 MStateAccessor& aAccessor,
43 MTransitionObserver& aObserver);
44 inline ~CExampleInterface_UnitTestContext();
46 CExampleInterface* iExampleInterface;
47 CExampleInterface* iSecondExampleInterface;
48 RImplInfoPtrArray iImplementations;
49 /** An extra thread so that we can use ECom multi-threaded */
50 RThread iListImplThread;
54 Comments : Transition of the NewL method
56 class CExampleInterfaceNewLTransition : public CTransitionType
59 inline CExampleInterfaceNewLTransition( CUnitTestContext& aUTContext,
60 TTransitionValidator& aValidator);
61 inline void TransitMethodL();
62 inline CExampleInterface_UnitTestContext& Context();
66 Comments : Transition of the NewL method with parameters.
68 class CExampleInterfaceNewWPLTransition : public CTransitionType
71 inline CExampleInterfaceNewWPLTransition( CUnitTestContext& aUTContext,
72 TTransitionValidator& aValidator);
73 inline void TransitMethodL();
74 inline CExampleInterface_UnitTestContext& Context();
78 Comments : Transition of the NewL method with a match descriptor for resolving.
80 class CExampleInterfaceNewResolveLTransition : public CTransitionType
83 inline CExampleInterfaceNewResolveLTransition( CUnitTestContext& aUTContext,
84 TTransitionValidator& aValidator);
85 inline void TransitMethodL();
86 inline CExampleInterface_UnitTestContext& Context();
90 Comments : Special transition which creates two objects
92 class CExampleInterfaceDoubleNewLTransition : public CTransitionType
95 inline CExampleInterfaceDoubleNewLTransition( CUnitTestContext& aUTContext,
96 TTransitionValidator& aValidator);
97 inline void TransitMethodL();
98 inline CExampleInterface_UnitTestContext& Context();
102 Comments : Transition of the destructor method
104 class CExampleInterfaceDtorTransition : public CTransitionType
107 inline CExampleInterfaceDtorTransition( CUnitTestContext& aUTContext,
108 TTransitionValidator& aValidator);
109 inline void TransitMethodL();
110 inline CExampleInterface_UnitTestContext& Context();
114 Comments : Special destructor transition which destroys two implementations
116 class CExampleInterfaceDoubleDtorTransition : public CTransitionType
119 inline CExampleInterfaceDoubleDtorTransition( CUnitTestContext& aUTContext,
120 TTransitionValidator& aValidator);
121 inline void TransitMethodL();
122 inline CExampleInterface_UnitTestContext& Context();
126 Comments : Transition of the DoMethodL method
128 class CExampleInterfaceDoMethodLTransition : public CTransitionType
131 inline CExampleInterfaceDoMethodLTransition( CUnitTestContext& aUTContext,
132 TTransitionValidator& aValidator);
133 inline void TransitMethodL();
134 inline CExampleInterface_UnitTestContext& Context();
138 Comments : Transition of the ListImplementationsL method
140 class CExampleInterfaceListImplementationsLTransition : public CTransitionType
143 inline CExampleInterfaceListImplementationsLTransition( CUnitTestContext& aUTContext,
144 TTransitionValidator& aValidator);
145 inline void TransitMethodL();
146 inline CExampleInterface_UnitTestContext& Context();
150 Comments : Transition of the ListAllImplementationsL method
152 class CExampleInterfaceListAllImplementationsLTransition : public CTransitionType
155 inline CExampleInterfaceListAllImplementationsLTransition( CUnitTestContext& aUTContext,
156 TTransitionValidator& aValidator);
157 inline void TransitMethodL();
158 inline CExampleInterface_UnitTestContext& Context();
162 Comments : Transition of the ListAllImplementationsL method which occurs in a separate thread
164 class CExampleInterfaceListImplementationsLNewThreadTransition : public CTransitionType
167 inline CExampleInterfaceListImplementationsLNewThreadTransition( CUnitTestContext& aUTContext,
168 TTransitionValidator& aValidator);
169 inline void TransitMethodL();
170 inline CExampleInterface_UnitTestContext& Context();
173 #include "MagicTransitions.inl"
175 #endif // __MAGICLeakTestTransition_H__