os/ossrv/lowlevellibsandfws/pluginfw/Test_Bed/ComponentTesterTest/ComponentTesterTransitions.inl
First public contribution.
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 // The implementation of the transition classes upon the CComponentTester class methods.
18 // ______________________________________________________________________________
20 _LIT(KComponentTesterNewLTransition,"CComponentTester_NewL_Transition");
22 inline CComponentTester_NewL_Transition::CComponentTester_NewL_Transition(CUnitTestContext& aUTContext,
23 TTransitionValidator& aValidator)
24 : CTransitionType(KComponentTesterNewLTransition, aUTContext, aValidator)
29 inline void CComponentTester_NewL_Transition::TransitMethodL()
31 _LIT(KComponentTesterNewLTransitMethod, "CComponentTester::NewL transition");
32 Context().DataLogger().LogInformation(KComponentTesterNewLTransitMethod);
33 TComponentTester_StateAccessor& accessor = REINTERPRET_CAST(TComponentTester_StateAccessor&, Context().StateAccessor());
34 Context().iComponentUnderTest = accessor.CreateComponentTester(*(Context().iComponentTester), *Context().iDataLogger, *Context().iObserver);
37 inline CComponentTester_UnitTestContext& CComponentTester_NewL_Transition::Context() const
39 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
42 // ______________________________________________________________________________
44 _LIT(KComponentTesterDtorTransition,"CComponentTester_Dtor_Transition");
46 inline CComponentTester_Dtor_Transition::CComponentTester_Dtor_Transition(CUnitTestContext& aUTContext,
47 TTransitionValidator& aValidator)
48 : CTransition(KComponentTesterDtorTransition, aUTContext, aValidator)
53 inline void CComponentTester_Dtor_Transition::TransitMethodL()
55 _LIT(KComponentTesterDtorTransitMethod, "CComponentTester::Dtor transition");
56 Context().DataLogger().LogInformation(KComponentTesterDtorTransitMethod);
57 delete Context().iComponentTester;
58 Context().iComponentTester = NULL;
61 inline CComponentTester_UnitTestContext& CComponentTester_Dtor_Transition::Context() const
63 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
66 // ______________________________________________________________________________
68 _LIT(KComponentTesterTransitionSetsLTransition,"CComponentTester_TransitionSetsL_Transition");
70 inline CComponentTester_TransitionSetsL_Transition::CComponentTester_TransitionSetsL_Transition(CUnitTestContext& aUTContext,
71 TTransitionValidator& aValidator)
72 : CTransitionType(KComponentTesterTransitionSetsLTransition, aUTContext, aValidator)
77 inline void CComponentTester_TransitionSetsL_Transition::TransitMethodL()
79 _LIT(KComponentTesterTransitionSetsLTransitMethod, "CComponentTester::TransitionSetsL transition");
80 Context().DataLogger().LogInformation(KComponentTesterTransitionSetsLTransitMethod);
81 Context().iComponentTester->TransitionSetsL();
84 inline CComponentTester_UnitTestContext& CComponentTester_TransitionSetsL_Transition::Context() const
86 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
89 // ______________________________________________________________________________
91 _LIT(KComponentTesterAddUnitTestLTransition,"CComponentTester_AddUnitTestL_Transition");
93 inline CComponentTester_AddUnitTestL_Transition::CComponentTester_AddUnitTestL_Transition(CUnitTestContext& aUTContext,
94 TTransitionValidator& aValidator)
95 : CTransitionType(KComponentTesterAddUnitTestLTransition, aUTContext, aValidator)
100 inline void CComponentTester_AddUnitTestL_Transition::TransitMethodL()
102 _LIT(KComponentTesterAddUnitTestLTransitMethod, "CComponentTester::AddUnitTestL transition");
103 Context().DataLogger().LogInformation(KComponentTesterAddUnitTestLTransitMethod);
104 TComponentTester_StateAccessor& accessor = REINTERPRET_CAST(TComponentTester_StateAccessor&, Context().StateAccessor());
105 accessor.AddUnitTestL(*(Context().iComponentTester), (Context().iUnitTest));
108 inline CComponentTester_UnitTestContext& CComponentTester_AddUnitTestL_Transition::Context() const
110 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
113 // ______________________________________________________________________________
115 _LIT(KComponentTesterAddParamUnitTestLTransition,"CComponentTester_AddParamUnitTestL_Transition");
117 inline CComponentTester_AddParamUnitTestL_Transition::CComponentTester_AddParamUnitTestL_Transition(CUnitTestContext& aUTContext,
118 TTransitionValidator& aValidator)
119 : CTransitionType(KComponentTesterAddParamUnitTestLTransition, aUTContext, aValidator)
124 inline void CComponentTester_AddParamUnitTestL_Transition::TransitMethodL()
126 _LIT(KComponentTesterAddParamUnitTestLTransitMethod, "CComponentTester::AddParamUnitTestL transition");
127 Context().DataLogger().LogInformation(KComponentTesterAddParamUnitTestLTransitMethod);
128 TComponentTester_StateAccessor& accessor = REINTERPRET_CAST(TComponentTester_StateAccessor&, Context().StateAccessor());
129 accessor.AddParamUnitTestL(*(Context().iComponentTester), (Context().iUnitTest));
132 inline CComponentTester_UnitTestContext& CComponentTester_AddParamUnitTestL_Transition::Context() const
134 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
137 // ______________________________________________________________________________
139 _LIT(KComponentTesterTestComponentTransition,"CComponentTester_TestComponent_Transition");
141 inline CComponentTester_TestComponent_Transition::CComponentTester_TestComponent_Transition(CUnitTestContext& aUTContext,
142 TTransitionValidator& aValidator)
143 : CTransition(KComponentTesterTestComponentTransition, aUTContext, aValidator)
148 inline void CComponentTester_TestComponent_Transition::TransitMethodL()
150 _LIT(KComponentTesterTestComponentTransitMethod, "CComponentTester::TestComponent transition");
151 Context().DataLogger().LogInformation(KComponentTesterTestComponentTransitMethod);
152 Context().iComponentTester->TestComponent(&Context().iTests);
155 inline CComponentTester_UnitTestContext& CComponentTester_TestComponent_Transition::Context() const
157 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
160 // ______________________________________________________________________________
162 _LIT(KComponentTesterRunLTransition,"CComponentTester_RunL_Transition");
164 inline CComponentTester_RunL_Transition::CComponentTester_RunL_Transition(CUnitTestContext& aUTContext,
165 TTransitionValidator& aValidator)
166 : CTransitionType(KComponentTesterRunLTransition, aUTContext, aValidator)
171 inline void CComponentTester_RunL_Transition::TransitMethodL()
173 _LIT(KComponentTesterRunLTransitMethod, "CComponentTester::RunL transition");
174 Context().DataLogger().LogInformation(KComponentTesterRunLTransitMethod);
175 TComponentTester_StateAccessor& accessor = REINTERPRET_CAST(TComponentTester_StateAccessor&, Context().StateAccessor());
176 accessor.RunL(*(Context().iComponentTester));
179 inline CComponentTester_UnitTestContext& CComponentTester_RunL_Transition::Context() const
181 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
184 // ______________________________________________________________________________
186 _LIT(KComponentTesterCompleteTransition,"CComponentTester_Complete_Transition");
188 inline CComponentTester_Complete_Transition::CComponentTester_Complete_Transition(CUnitTestContext& aUTContext,
189 TTransitionValidator& aValidator)
190 : CTransition(KComponentTesterCompleteTransition, aUTContext, aValidator)
195 inline void CComponentTester_Complete_Transition::TransitMethodL()
197 _LIT(KComponentTesterCompleteTransitMethod, "CComponentTester::Complete transition");
198 Context().DataLogger().LogInformation(KComponentTesterCompleteTransitMethod);
199 Context().iComponentTester->Complete(Context().iUnitTest);
202 inline CComponentTester_UnitTestContext& CComponentTester_Complete_Transition::Context() const
204 return REINTERPRET_CAST(CComponentTester_UnitTestContext&,iUTContext);
208 // Add additional Transition class Implementations here...