contextframework/cfw/tsrc/public/basic/UT_CCFEngine/UT_CCFEngine.cpp
changeset 0 2e3d3ce01487
child 28 b0b858956ed5
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2007 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 //  CLASS HEADER
       
    20 #include "UT_CCFEngine.h"
       
    21 #include "CFTestDelay.h"
       
    22 
       
    23 //  EXTERNAL INCLUDES
       
    24 #include <EUnitMacros.h>
       
    25 #include <ECom/ECom.h>
       
    26 
       
    27 //  INTERNAL INCLUDES
       
    28 #include "CFEngine.h"
       
    29 #include "cftestcontextlistener.h"
       
    30 #include "CFContextInterface.h"
       
    31 #include "CFContextSubscription.h"
       
    32 #include "CFContextIndication.h"
       
    33 #include "cfenvutils.h"
       
    34 
       
    35 // CONSTANTS
       
    36 const TInt KSecond = 1000000;
       
    37 
       
    38 // CONSTRUCTION
       
    39 UT_CCFEngine* UT_CCFEngine::NewL()
       
    40     {
       
    41     UT_CCFEngine* self = UT_CCFEngine::NewLC();
       
    42     CleanupStack::Pop();
       
    43 
       
    44     return self;
       
    45     }
       
    46 
       
    47 UT_CCFEngine* UT_CCFEngine::NewLC()
       
    48     {
       
    49     UT_CCFEngine* self = new( ELeave ) UT_CCFEngine();
       
    50     CleanupStack::PushL( self );
       
    51 
       
    52     self->ConstructL();
       
    53 
       
    54     return self;
       
    55     }
       
    56 
       
    57 // Destructor (virtual by CBase)
       
    58 UT_CCFEngine::~UT_CCFEngine()
       
    59     {
       
    60     // Enable screen saver
       
    61     CFEnvUtils::EnableScreenSaver( ETrue );
       
    62     }
       
    63 
       
    64 // Default constructor
       
    65 UT_CCFEngine::UT_CCFEngine()
       
    66     {
       
    67     }
       
    68 
       
    69 // Second phase construct
       
    70 void UT_CCFEngine::ConstructL()
       
    71     {
       
    72     // The ConstructL from the base class CEUnitTestSuiteClass must be called.
       
    73     // It generates the test case table.
       
    74     CEUnitTestSuiteClass::ConstructL();
       
    75 
       
    76     // Disable screen saver
       
    77     CFEnvUtils::EnableScreenSaver( EFalse );
       
    78     }
       
    79     
       
    80     
       
    81 // INTERFACE IMPLEMENTATIONS
       
    82 
       
    83 // from MCFContextSubscriptionListener
       
    84 void UT_CCFEngine::ContextIndicationL( CCFContextIndication* aIndication )
       
    85 	{
       
    86 	iIndication = ETrue;
       
    87 	delete aIndication;	
       
    88 
       
    89     if ( iRemoveSubscription )
       
    90         {
       
    91         iCFContextInterface->UnsubscribeContext( *iRemoveSubscription, *this);
       
    92         iRemoveSubscription = NULL;
       
    93         }
       
    94     if ( iRemoveSubscriptions )
       
    95         {
       
    96         iCFContextInterface->UnsubscribeContexts( *this );
       
    97         }
       
    98     }
       
    99 
       
   100 // from MCFContextSubscriptionListener
       
   101 TInt UT_CCFEngine::Client( RThread& aThread ) const
       
   102 	{
       
   103 	aThread = RThread();
       
   104 	return KErrNone;
       
   105 	}
       
   106         
       
   107 // from MCFContextSubscriptionListener
       
   108 void UT_CCFEngine::HandleContextSubscriptionError( TInt /*aError*/,
       
   109             const TDesC& /*aSource*/,
       
   110             const TDesC& /*aType*/ )
       
   111     {
       
   112     iSubscriptionError = ETrue;
       
   113     StopWait();
       
   114     }
       
   115     
       
   116 
       
   117 // from MCFSecurityChecker
       
   118 TBool UT_CCFEngine::CheckClientSecurity( const RThread& aClientThread,
       
   119 	const TSecurityPolicy& aSecurityPolicy )
       
   120 	{
       
   121     // Security check only needed if request is from other process than CF
       
   122     TBool securityPassed = ETrue;
       
   123     
       
   124     if ( iDoSecurityCheck > 0 )
       
   125     	{
       
   126     	iDoSecurityCheck--;	
       
   127     	securityPassed = aSecurityPolicy.CheckPolicy( aClientThread );
       
   128     	}
       
   129     return securityPassed;
       
   130 	}
       
   131 
       
   132 
       
   133 //  METHODS
       
   134 
       
   135 
       
   136 
       
   137 void UT_CCFEngine::SetupForNewL(  )
       
   138     {
       
   139 	iWait = new( ELeave ) CActiveSchedulerWait;
       
   140 	iTestDelay = CCFTestDelay::NewL();
       
   141     }
       
   142 
       
   143 void UT_CCFEngine::StopWait()
       
   144 	{
       
   145 	if( iWait )
       
   146         {
       
   147         if( iWait->IsStarted() )
       
   148             {
       
   149             iWait->AsyncStop();
       
   150             }
       
   151         delete iWait;
       
   152         iWait = NULL;
       
   153         }	
       
   154 	}
       
   155 
       
   156 void UT_CCFEngine::TeardownForNewL(  )
       
   157     {
       
   158     iTestDelay->Start( KSecond );
       
   159     
       
   160     delete iTestDelay;
       
   161     iTestDelay = NULL;
       
   162 	if( iWait )
       
   163         {
       
   164         if( iWait->IsStarted() )
       
   165             {
       
   166             iWait->AsyncStop();
       
   167             }
       
   168         delete iWait;
       
   169         iWait = NULL;
       
   170         }
       
   171 
       
   172 #ifdef __WINS__
       
   173     REComSession::FinalClose();
       
   174 #endif
       
   175     }
       
   176     
       
   177 void UT_CCFEngine::SetupL(  )
       
   178     {
       
   179 	SetupForNewL();
       
   180 	iCFEngine = CCFEngine::NewL( *this );
       
   181 	iCFContextInterface = (MCFContextInterface*) iCFEngine;
       
   182 	
       
   183 	iTestDelay->Start( KSecond * 2 );
       
   184     }
       
   185 
       
   186 void UT_CCFEngine::Teardown(  )
       
   187     {
       
   188 	delete iCFEngine;
       
   189     iCFEngine = NULL;
       
   190 	iCFContextInterface = NULL;
       
   191 	iIndication = EFalse;
       
   192 	iSubscriptionError = EFalse;
       
   193 	TeardownForNewL();
       
   194     }
       
   195 
       
   196 void UT_CCFEngine::UT_CCFEngine_NewLL(  )
       
   197     {
       
   198     CCFEngine* engine = CCFEngine::NewL( *this );
       
   199     
       
   200     CleanupStack::PushL( engine );
       
   201     
       
   202     EUNIT_ASSERT_DESC( engine, "CFEngine not created!" );
       
   203     
       
   204     iTestDelay->Start( KSecond * 4 );
       
   205     
       
   206     CleanupStack::PopAndDestroy();
       
   207     }
       
   208 
       
   209 void UT_CCFEngine::UT_CCFEngine_NewLCL(  )
       
   210     {
       
   211     CCFEngine* engine = CCFEngine::NewLC( *this );
       
   212     
       
   213     EUNIT_ASSERT_DESC( engine, "CFEngine not created!" );
       
   214     
       
   215     iTestDelay->Start( KSecond * 2 );
       
   216 
       
   217     CleanupStack::PopAndDestroy(engine);
       
   218     }
       
   219 
       
   220 void UT_CCFEngine::UT_PublishContextL( )
       
   221 	{
       
   222 	RThread thread;
       
   223 	CleanupClosePushL(thread);
       
   224 
       
   225 	CCFContextObject* co = CCFContextObject::NewLC();
       
   226 	co->SetSourceL(_L("testsource"));
       
   227 	co->SetTypeL(_L("testtype"));
       
   228 	co->SetValueL(_L("testvalue"));
       
   229 	TInt error = iCFContextInterface->PublishContext( *co, thread );	
       
   230 	EUNIT_ASSERT_DESC ( error, "Context published succeed without defining!" );
       
   231 	
       
   232 	static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   233 	error = iCFContextInterface->DefineContext( _L("testsource"),
       
   234 		_L("testtype"), alwaysPass );
       
   235 	
       
   236 	EUNIT_ASSERT_DESC ( !error, "Could not define context!" );
       
   237 	
       
   238 	error = iCFContextInterface->PublishContext( *co, thread );	
       
   239 	EUNIT_ASSERT_DESC ( !error, "Context published returned an error!" );
       
   240 		
       
   241 	CleanupStack::PopAndDestroy( co );
       
   242 	CleanupStack::PopAndDestroy( &thread );
       
   243 	}
       
   244 
       
   245 
       
   246 
       
   247 void UT_CCFEngine::UT_SubscribeContextL()
       
   248 	{
       
   249 	RThread thread;
       
   250 	CleanupClosePushL(thread);
       
   251 
       
   252 	CCFContextSubscription* subscription = CCFContextSubscription::NewLC();
       
   253 	subscription->SetContextSourceL(_L("testsource"));
       
   254 	subscription->SetContextTypeL(_L("listenedtype"));
       
   255 	CleanupStack::Pop( subscription );
       
   256 
       
   257 	// make subscription	
       
   258 	TInt error = iCFContextInterface->SubscribeContext(subscription,
       
   259 		this, thread);
       
   260 	EUNIT_ASSERT_DESC ( !error, "Subscription did not succeeded!");
       
   261 
       
   262 	// define context 1
       
   263 	static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   264 	error = iCFContextInterface->DefineContext( _L("testsource"),
       
   265 		_L("notlistenedtype"), alwaysPass );
       
   266 	EUNIT_ASSERT_DESC ( !error, "Could not define context!" );
       
   267 
       
   268 	// define context 2
       
   269 	error = iCFContextInterface->DefineContext( _L("testsource"),
       
   270 		_L("listenedtype"), alwaysPass );
       
   271 	EUNIT_ASSERT_DESC ( !error, "Could not define context!" );
       
   272 
       
   273 
       
   274 	CCFContextObject* co = CCFContextObject::NewLC();
       
   275 	co->SetSourceL(_L("testsource"));
       
   276 	co->SetTypeL(_L("listenedtype"));
       
   277 	co->SetValueL(_L("testvalue"));
       
   278 	error = iCFContextInterface->PublishContext( *co, thread );	
       
   279 	EUNIT_ASSERT_DESC ( !error, "Context publish returned an error!" );
       
   280 
       
   281     iTestDelay->Start( KSecond / 2 );
       
   282 
       
   283 	// check that we get the published context
       
   284 	EUNIT_ASSERT_DESC ( iIndication, "Context indication did not arrive");
       
   285 	iIndication = EFalse;
       
   286 	
       
   287 	//CCFContextObject* co = CCFContextObject::NewLC();
       
   288 	co->SetSourceL(_L("testsource"));
       
   289 	co->SetTypeL(_L("notlistenedtype"));
       
   290 	co->SetValueL(_L("testvalue"));
       
   291 	error = iCFContextInterface->PublishContext( *co, thread );	
       
   292 	EUNIT_ASSERT_DESC ( !error, "Context publish returned an error!" );
       
   293 	
       
   294 	// check that we did not get the published context
       
   295 	EUNIT_ASSERT_DESC ( !iIndication,
       
   296 		"Context indication arrived for context not listened!");
       
   297 	
       
   298 	
       
   299 	// Test subscription that fails later because of capabilities
       
   300 	// Cannot be tested from the same process because
       
   301 	// subscription from same process will always succeed.
       
   302 	/* 
       
   303 	CCFContextSubscription* subscription2 = CCFContextSubscription::NewL();
       
   304 	subscription->SetContextSource(_L("testsource"));
       
   305 	subscription->SetContextType(_L("highcapabilities"));
       
   306 	
       
   307 	error = iCFContextInterface->SubscribeContext(subscription2,
       
   308 		this, thread);
       
   309 	EUNIT_ASSERT_DESC ( !error, "Subscription did not succeeded!");
       
   310 	
       
   311 	static _LIT_SECURITY_POLICY_FAIL( alwaysFail );
       
   312 	error = iCFContextInterface->DefineContext( _L("testsource"),
       
   313 		_L("highcapabilities"), alwaysFail );
       
   314 	EUNIT_ASSERT_DESC ( !error, "Could not define context!" );
       
   315 	
       
   316 	iTestDelay->Start(1000000); // 1 seconds
       
   317 	
       
   318 	EUNIT_ASSERT_DESC ( iSubscriptionError, 
       
   319 		"Subscription remains although high capabilities required");
       
   320 	
       
   321 	*/
       
   322 	
       
   323 	CleanupStack::PopAndDestroy( co );	
       
   324 	CleanupStack::PopAndDestroy( &thread );	
       
   325 	}
       
   326 
       
   327 void UT_CCFEngine::UT_RemoveContextSubscriptionL()
       
   328 	{
       
   329 	RThread thread;
       
   330 	CleanupClosePushL(thread);
       
   331 
       
   332 	CCFContextSubscription* subscription = CCFContextSubscription::NewLC();
       
   333 	subscription->SetContextSourceL(_L("testsource"));
       
   334 	subscription->SetContextTypeL(_L("listenedtype"));
       
   335 	CleanupStack::Pop( subscription );
       
   336 
       
   337 	// make subscription	
       
   338 	TInt error = iCFContextInterface->SubscribeContext(subscription,
       
   339 		this, thread);
       
   340 	EUNIT_ASSERT_DESC ( !error, "Subscription did not succeeded!");
       
   341 
       
   342 	// define context
       
   343 	static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   344 	error = iCFContextInterface->DefineContext( _L("testsource"),
       
   345 		_L("listenedtype"), alwaysPass );
       
   346 	EUNIT_ASSERT_DESC ( !error, "Could not define context!" );
       
   347 
       
   348 	iCFContextInterface->UnsubscribeContext(*subscription,
       
   349 		*this);
       
   350 	EUNIT_ASSERT_DESC ( !error, "Could not remove context subscription!" );	
       
   351     
       
   352     iTestDelay->Start( KSecond / 2 );
       
   353 
       
   354 	CCFContextObject* co = CCFContextObject::NewLC();
       
   355 	co->SetSourceL(_L("testsource"));
       
   356 	co->SetTypeL(_L("listenedtype"));
       
   357 	co->SetValueL(_L("testvalue"));
       
   358 	error = iCFContextInterface->PublishContext( *co, thread );	
       
   359 	EUNIT_ASSERT_DESC ( !error, "Context publish returned an error!" );
       
   360 
       
   361     iTestDelay->Start( KSecond / 2 );
       
   362 
       
   363 	// check that we get the published context
       
   364 	EUNIT_ASSERT_DESC ( !iIndication, "Context indication did arrive");
       
   365 	iIndication = EFalse;
       
   366 		
       
   367 	CleanupStack::PopAndDestroy( co );	
       
   368 	CleanupStack::PopAndDestroy( &thread );	
       
   369 	}
       
   370 
       
   371 void UT_CCFEngine::UT_RemoveSubscriptionDuringIdicationL()
       
   372     {
       
   373     RThread thread;
       
   374     CleanupClosePushL(thread);
       
   375 
       
   376     CCFContextSubscription* subscription1 = CCFContextSubscription::NewLC();
       
   377     subscription1->SetContextSourceL(_L("testsource"));
       
   378     subscription1->SetContextTypeL(_L("listenedtype"));
       
   379     CleanupStack::Pop( subscription1 );
       
   380 
       
   381     // make the dummy subscription
       
   382     TInt error = iCFContextInterface->SubscribeContext(subscription1,
       
   383         this, thread);
       
   384     EUNIT_ASSERT_DESC ( error == KErrNone, "Subscription did not succeeded!");
       
   385 
       
   386     CCFContextSubscription* subscription2 = CCFContextSubscription::NewLC();
       
   387     subscription2->SetContextSourceL(_L("testsource"));
       
   388     subscription2->SetContextTypeL(_L("listenedtype"));
       
   389     CleanupStack::Pop( subscription2 );
       
   390 
       
   391     // make subscription    
       
   392     error = iCFContextInterface->SubscribeContext(subscription2, this, thread);
       
   393     EUNIT_ASSERT_DESC ( error == KErrNone, "Subscription did not succeeded!");
       
   394 
       
   395     // define context
       
   396     static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   397     error = iCFContextInterface->DefineContext( _L("testsource"),
       
   398         _L("listenedtype"), alwaysPass );
       
   399     EUNIT_ASSERT_DESC ( error == KErrNone, "DefineContext did not succeeded!");
       
   400 
       
   401     // Set remove susbcription that will be removed during next context
       
   402     // indication
       
   403     iRemoveSubscription = subscription1;
       
   404 
       
   405     iIndication = EFalse;
       
   406     CCFContextObject* co = CCFContextObject::NewLC();
       
   407     co->SetSourceL(_L("testsource"));
       
   408     co->SetTypeL(_L("listenedtype"));
       
   409     co->SetValueL(_L("testvalue"));
       
   410     error = iCFContextInterface->PublishContext( *co, thread );
       
   411 
       
   412     iTestDelay->Start( KSecond / 2 );
       
   413 
       
   414     // check that we get the published context
       
   415     EUNIT_ASSERT_DESC ( iIndication, "Context indication shoud have arrived");
       
   416     iIndication = EFalse;
       
   417 
       
   418     CleanupStack::PopAndDestroy( co );
       
   419     CleanupStack::PopAndDestroy( &thread );
       
   420     }
       
   421 
       
   422 void UT_CCFEngine::UT_RemoveSubscriptionDuringIdication2L()
       
   423     {
       
   424     RThread thread;
       
   425     CleanupClosePushL(thread);
       
   426 
       
   427     CCFTestContextListener* listener = CCFTestContextListener::NewLC();
       
   428 
       
   429     CCFContextSubscription* subscription1 = CCFContextSubscription::NewLC();
       
   430     subscription1->SetContextSourceL(_L("testsource"));
       
   431     subscription1->SetContextTypeL(_L("listenedtype"));
       
   432     CleanupStack::Pop( subscription1 );
       
   433 
       
   434     // make the dummy subscription
       
   435     TInt error = iCFContextInterface->SubscribeContext(subscription1,
       
   436         this, thread);
       
   437     EUNIT_ASSERT_DESC ( error == KErrNone, "Subscription did not succeeded!");
       
   438 
       
   439     CCFContextSubscription* subscription2 = CCFContextSubscription::NewLC();
       
   440     subscription2->SetContextSourceL(_L("testsource"));
       
   441     subscription2->SetContextTypeL(_L("listenedtype"));
       
   442     CleanupStack::Pop( subscription2 );
       
   443 
       
   444     // make subscription    
       
   445     error = iCFContextInterface->SubscribeContext(subscription2, this, thread);
       
   446     EUNIT_ASSERT_DESC ( error == KErrNone, "Subscription did not succeeded!");
       
   447 
       
   448     CCFContextSubscription* subscription3 = CCFContextSubscription::NewLC();
       
   449     subscription3->SetContextSourceL(_L("testsource"));
       
   450     subscription3->SetContextTypeL(_L("listenedtype"));
       
   451     CleanupStack::Pop( subscription3 );
       
   452 
       
   453     // make subscription with listener
       
   454     error = iCFContextInterface->SubscribeContext(subscription3, listener, thread);
       
   455     EUNIT_ASSERT_DESC ( error == KErrNone, "Subscription did not succeeded!");
       
   456 
       
   457     // define context
       
   458     static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   459     error = iCFContextInterface->DefineContext( _L("testsource"),
       
   460         _L("listenedtype"), alwaysPass );
       
   461     EUNIT_ASSERT_DESC ( error == KErrNone, "DefineContext did not succeeded!");
       
   462 
       
   463     // Set remove susbcriptions flag so that all subscription from this
       
   464     // (UT_CCFEngine) listener will be removed during next context indication.
       
   465     iRemoveSubscriptions = ETrue;
       
   466 
       
   467     EUNIT_ASSERT_DESC ( !listener->iLastIndication, "Separate listener should not have context indication");
       
   468 
       
   469     iIndication = EFalse;
       
   470     CCFContextObject* co = CCFContextObject::NewLC();
       
   471     co->SetSourceL(_L("testsource"));
       
   472     co->SetTypeL(_L("listenedtype"));
       
   473     co->SetValueL(_L("testvalue"));
       
   474     error = iCFContextInterface->PublishContext( *co, thread );
       
   475 
       
   476     iTestDelay->Start( KSecond / 2 );
       
   477 
       
   478     // check that we get the published context
       
   479     EUNIT_ASSERT_DESC ( iIndication, "Context indication shoud have arrived");
       
   480     iIndication = EFalse;
       
   481     // check that separate listener class also received indication
       
   482     EUNIT_ASSERT_DESC ( listener->iLastIndication, "Context indication shoud have arrived for separate listener");
       
   483     EUNIT_ASSERT_DESC ( !listener->iSubscriptionError, "Subscription error for separate listener");
       
   484 
       
   485     CleanupStack::PopAndDestroy( co );
       
   486     CleanupStack::PopAndDestroy( listener );
       
   487     CleanupStack::PopAndDestroy( &thread );
       
   488     }
       
   489 
       
   490 void UT_CCFEngine::UT_DefineContextL()
       
   491 	{
       
   492 	RThread thread;
       
   493 	CleanupClosePushL( thread );
       
   494     static _LIT_SECURITY_POLICY_PASS( alwaysPass );
       
   495 
       
   496     // x. Define test context
       
   497     //--------------------------------------------------------------------------
       
   498     TInt err = iCFContextInterface->DefineContext(
       
   499         _L("testsource"), _L("testtype"), alwaysPass );
       
   500     EUNIT_ASSERT_DESC ( err == KErrNone, "Define context failed" );
       
   501 
       
   502     // x. Re-define test context
       
   503     //--------------------------------------------------------------------------
       
   504     err = iCFContextInterface->DefineContext(
       
   505         _L("testsource"), _L("testtype"), alwaysPass );
       
   506     EUNIT_ASSERT_DESC ( err == KErrNone, "Define context failed" );
       
   507 
       
   508 	CleanupStack::PopAndDestroy( &thread );
       
   509 	}
       
   510 
       
   511 
       
   512 //  TEST TABLE
       
   513 
       
   514 EUNIT_BEGIN_TEST_TABLE(
       
   515     UT_CCFEngine,
       
   516     "CCFEngine class unit test.",
       
   517     "UNIT" )
       
   518 
       
   519 EUNIT_TEST(
       
   520     "NewL - test ",
       
   521     "CCFEngine",
       
   522     "NewL",
       
   523     "FUNCTIONALITY",
       
   524     SetupForNewL, UT_CCFEngine_NewLL, TeardownForNewL)
       
   525 
       
   526 EUNIT_TEST(
       
   527     "NewLC - test ",
       
   528     "CCFEngine",
       
   529     "NewLC",
       
   530     "FUNCTIONALITY",
       
   531     SetupForNewL, UT_CCFEngine_NewLCL, TeardownForNewL)
       
   532 
       
   533 EUNIT_TEST(
       
   534     "PublishContext - test ",
       
   535     "CCFEngine",
       
   536     "PublishContext",
       
   537     "FUNCTIONALITY",
       
   538     SetupL, UT_PublishContextL, Teardown)
       
   539 
       
   540 EUNIT_TEST(
       
   541     "SubscribeContext - test ",
       
   542     "CCFEngine",
       
   543     "SubscribeContext",
       
   544     "FUNCTIONALITY",
       
   545     SetupL, UT_SubscribeContextL, Teardown)
       
   546     
       
   547 EUNIT_TEST(
       
   548     "DefineContext - test ",
       
   549     "CCFEngine",
       
   550     "DefineContext",
       
   551     "FUNCTIONALITY",
       
   552     SetupL, UT_DefineContextL, Teardown)
       
   553 
       
   554 EUNIT_TEST(
       
   555     "RemoveContextSubscription - test ",
       
   556     "CCFEngine",
       
   557     "RemoveContextSubscription",
       
   558     "FUNCTIONALITY",
       
   559     SetupL, UT_RemoveContextSubscriptionL, Teardown)
       
   560 
       
   561 EUNIT_TEST(
       
   562     "2 RemoveContextSubscription - during context indication",
       
   563     "CCFEngine",
       
   564     "RemoveContextSubscription",
       
   565     "FUNCTIONALITY",
       
   566     SetupL, UT_RemoveSubscriptionDuringIdicationL, Teardown)
       
   567 
       
   568 EUNIT_TEST(
       
   569     "3 RemoveContextSubscription - 2nd during context indication",
       
   570     "CCFEngine",
       
   571     "RemoveContextSubscription",
       
   572     "FUNCTIONALITY",
       
   573     SetupL, UT_RemoveSubscriptionDuringIdication2L, Teardown)
       
   574 
       
   575 
       
   576 EUNIT_END_TEST_TABLE
       
   577 
       
   578 //  END OF FILE