1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/lowlevellibsandfws/pluginfw/Framework/FrameTests/MagicTransitions.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,175 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// This file contains the definitions for
1.18 +// the transition classes for testing the
1.19 +// CExampleInterface class.
1.20 +//
1.21 +//
1.22 +
1.23 +#ifndef __MAGICTRANSITION_H__
1.24 +#define __MAGICTRANSITION_H__
1.25 +
1.26 +#include <ecom/test_bed/transition.h>
1.27 +#include "LeakTestTransition.h"
1.28 +#include "Interface.h"
1.29 +
1.30 +class CExampleInterface;
1.31 +
1.32 +#define CTransitionType CLeakTestTransition
1.33 +
1.34 +// ______________________________________________________________________________
1.35 +//
1.36 +/**
1.37 + Comments : The context in which the transitions will run
1.38 + That is to say the container in which the transition
1.39 + parameters are passed around
1.40 + */
1.41 +class CExampleInterface_UnitTestContext : public CUnitTestContext
1.42 + {
1.43 +public:
1.44 + inline CExampleInterface_UnitTestContext(CDataLogger& aDataLogger,
1.45 + MStateAccessor& aAccessor,
1.46 + MTransitionObserver& aObserver);
1.47 + inline ~CExampleInterface_UnitTestContext();
1.48 +
1.49 + CExampleInterface* iExampleInterface;
1.50 + CExampleInterface* iSecondExampleInterface;
1.51 + RImplInfoPtrArray iImplementations;
1.52 + /** An extra thread so that we can use ECom multi-threaded */
1.53 + RThread iListImplThread;
1.54 + };
1.55 +
1.56 +/**
1.57 + Comments : Transition of the NewL method
1.58 + */
1.59 +class CExampleInterfaceNewLTransition : public CTransitionType
1.60 + {
1.61 +public:
1.62 + inline CExampleInterfaceNewLTransition( CUnitTestContext& aUTContext,
1.63 + TTransitionValidator& aValidator);
1.64 + inline void TransitMethodL();
1.65 + inline CExampleInterface_UnitTestContext& Context();
1.66 + };
1.67 +
1.68 +/**
1.69 + Comments : Transition of the NewL method with parameters.
1.70 + */
1.71 +class CExampleInterfaceNewWPLTransition : public CTransitionType
1.72 + {
1.73 +public:
1.74 + inline CExampleInterfaceNewWPLTransition( CUnitTestContext& aUTContext,
1.75 + TTransitionValidator& aValidator);
1.76 + inline void TransitMethodL();
1.77 + inline CExampleInterface_UnitTestContext& Context();
1.78 + };
1.79 +
1.80 +/**
1.81 + Comments : Transition of the NewL method with a match descriptor for resolving.
1.82 + */
1.83 +class CExampleInterfaceNewResolveLTransition : public CTransitionType
1.84 + {
1.85 +public:
1.86 + inline CExampleInterfaceNewResolveLTransition( CUnitTestContext& aUTContext,
1.87 + TTransitionValidator& aValidator);
1.88 + inline void TransitMethodL();
1.89 + inline CExampleInterface_UnitTestContext& Context();
1.90 + };
1.91 +
1.92 +/**
1.93 + Comments : Special transition which creates two objects
1.94 + */
1.95 +class CExampleInterfaceDoubleNewLTransition : public CTransitionType
1.96 + {
1.97 +public:
1.98 + inline CExampleInterfaceDoubleNewLTransition( CUnitTestContext& aUTContext,
1.99 + TTransitionValidator& aValidator);
1.100 + inline void TransitMethodL();
1.101 + inline CExampleInterface_UnitTestContext& Context();
1.102 + };
1.103 +
1.104 +/**
1.105 + Comments : Transition of the destructor method
1.106 + */
1.107 +class CExampleInterfaceDtorTransition : public CTransitionType
1.108 + {
1.109 +public:
1.110 + inline CExampleInterfaceDtorTransition( CUnitTestContext& aUTContext,
1.111 + TTransitionValidator& aValidator);
1.112 + inline void TransitMethodL();
1.113 + inline CExampleInterface_UnitTestContext& Context();
1.114 + };
1.115 +
1.116 +/**
1.117 + Comments : Special destructor transition which destroys two implementations
1.118 + */
1.119 +class CExampleInterfaceDoubleDtorTransition : public CTransitionType
1.120 + {
1.121 +public:
1.122 + inline CExampleInterfaceDoubleDtorTransition( CUnitTestContext& aUTContext,
1.123 + TTransitionValidator& aValidator);
1.124 + inline void TransitMethodL();
1.125 + inline CExampleInterface_UnitTestContext& Context();
1.126 + };
1.127 +
1.128 +/**
1.129 + Comments : Transition of the DoMethodL method
1.130 + */
1.131 +class CExampleInterfaceDoMethodLTransition : public CTransitionType
1.132 + {
1.133 +public:
1.134 + inline CExampleInterfaceDoMethodLTransition( CUnitTestContext& aUTContext,
1.135 + TTransitionValidator& aValidator);
1.136 + inline void TransitMethodL();
1.137 + inline CExampleInterface_UnitTestContext& Context();
1.138 + };
1.139 +
1.140 +/**
1.141 + Comments : Transition of the ListImplementationsL method
1.142 + */
1.143 +class CExampleInterfaceListImplementationsLTransition : public CTransitionType
1.144 + {
1.145 +public:
1.146 + inline CExampleInterfaceListImplementationsLTransition( CUnitTestContext& aUTContext,
1.147 + TTransitionValidator& aValidator);
1.148 + inline void TransitMethodL();
1.149 + inline CExampleInterface_UnitTestContext& Context();
1.150 + };
1.151 +
1.152 +/**
1.153 + Comments : Transition of the ListAllImplementationsL method
1.154 + */
1.155 +class CExampleInterfaceListAllImplementationsLTransition : public CTransitionType
1.156 + {
1.157 +public:
1.158 + inline CExampleInterfaceListAllImplementationsLTransition( CUnitTestContext& aUTContext,
1.159 + TTransitionValidator& aValidator);
1.160 + inline void TransitMethodL();
1.161 + inline CExampleInterface_UnitTestContext& Context();
1.162 + };
1.163 +
1.164 +/**
1.165 + Comments : Transition of the ListAllImplementationsL method which occurs in a separate thread
1.166 + */
1.167 +class CExampleInterfaceListImplementationsLNewThreadTransition : public CTransitionType
1.168 + {
1.169 +public:
1.170 + inline CExampleInterfaceListImplementationsLNewThreadTransition( CUnitTestContext& aUTContext,
1.171 + TTransitionValidator& aValidator);
1.172 + inline void TransitMethodL();
1.173 + inline CExampleInterface_UnitTestContext& Context();
1.174 + };
1.175 +
1.176 +#include "MagicTransitions.inl"
1.177 +
1.178 +#endif // __MAGICLeakTestTransition_H__