idlefw/tsrc/mcsplugin/ut_mcssettings/ut_mcssettings.cpp
branchRCL_3
changeset 111 053c6c7c14f3
equal deleted inserted replaced
110:2c7f27287390 111:053c6c7c14f3
       
     1 /*
       
     2 * Copyright (c) 2009 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_mcssettings.h"
       
    21 
       
    22 //  EXTERNAL INCLUDES
       
    23 
       
    24 #define protected public
       
    25 #define private public
       
    26 #include "mcspluginsettingsapplist.h"
       
    27 #include "mcspluginsettingsbkmlist.h"
       
    28 #include <gsbaseview.h>
       
    29 #undef private
       
    30 #undef protected
       
    31 
       
    32 #include <msvuids.h>        // For KMsvRootIndexEntryIdValue
       
    33 #include <senduimtmuids.h>
       
    34 
       
    35 #include <digia/eunit/eunitmacros.h>
       
    36 #include <GSPrivatePluginProviderIds.h>
       
    37 #include <aknappui.h>
       
    38 #include <aknviewappui.h>
       
    39 #include <eikenv.h>
       
    40 #include <CentralRepository.h>
       
    41 #include <apgcli.h>         //RApaLsSession
       
    42 #include <w32std.h>                 // For RWsSession
       
    43 
       
    44 //  INTERNAL INCLUDES
       
    45 #include "mcspluginsettings.h"
       
    46 #include "mcspluginsettingsapplist.h"
       
    47 #include "mcspluginsettingscontainer.h"
       
    48 #include "mcspluginsettingsmodel.h"
       
    49 #include "mcspluginsettingsbkmlist.h"
       
    50 
       
    51 #include "caouserafter.h"
       
    52 #include "mcspluginuids.hrh"
       
    53 #include "mcspluginsettings.hrh"
       
    54 
       
    55 #include <favouritesitemlist.h>
       
    56 #include <mcsmenuitem.h>
       
    57 #include <mcsmenufilter.h>
       
    58 #include <hspluginsettings.h>
       
    59 #include <apgtask.h>
       
    60 #include <hlplch.h>
       
    61 
       
    62 
       
    63 const TUid KCRUidAvkon = { 0x101F876E };
       
    64 const TUint32 KAknMiddleSoftkeyEnabled = 0x0000000A;
       
    65 
       
    66 const TInt KWait_05_secs =  0.5 * 1000000;
       
    67 const TInt KWait_1_secs  =    1 * 1000000;
       
    68 const TInt KWait_2_secs  =    2 * 1000000;
       
    69 const TInt KWait_3_secs  =    3 * 1000000;
       
    70 
       
    71 _LIT8( KEmpty, "" );
       
    72 _LIT( KMyMenuData, "matrixmenudata" );
       
    73 _LIT( KMenuUrl, "menu:url" );
       
    74 _LIT8( KPluginId, "3" );
       
    75 _LIT(KUid, "0x99999985");
       
    76 _LIT(KName, "TEST");
       
    77 _LIT( KUrl, "http://test" );
       
    78 _LIT8( KUidMCSB8, "0xeeeeffff" );
       
    79 _LIT( KUidMCSB16, "0xeeeeffff" );
       
    80 
       
    81 
       
    82 // ----------------------------------------------------------------------------
       
    83 // CleanupResetAndDestroy()
       
    84 // ----------------------------------------------------------------------------
       
    85 //
       
    86 template<class T>
       
    87 static void CleanupResetAndDestroy( TAny* aObj )
       
    88     {
       
    89     if( aObj )
       
    90         {
       
    91         static_cast<T*>( aObj )->ResetAndDestroy();
       
    92         }
       
    93     }
       
    94 
       
    95 // ----------------------------------------------------------------------------
       
    96 // CleanupResetAndDestroyPushL
       
    97 // ----------------------------------------------------------------------------
       
    98 //
       
    99 template<class T>
       
   100 static void CleanupResetAndDestroyPushL(T& aArray)
       
   101     {
       
   102     CleanupStack::PushL( TCleanupItem( &CleanupResetAndDestroy<T>, &aArray ) );
       
   103     }
       
   104 
       
   105 
       
   106 // CONSTRUCTION
       
   107 
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 // ---------------------------------------------------------------------------
       
   111 //
       
   112 UT_mcssettings* UT_mcssettings::NewL()
       
   113 {
       
   114     UT_mcssettings* self = UT_mcssettings::NewLC();
       
   115     CleanupStack::Pop();
       
   116 
       
   117     return self;
       
   118 }
       
   119 
       
   120 // ---------------------------------------------------------------------------
       
   121 //
       
   122 // ---------------------------------------------------------------------------
       
   123 //
       
   124 UT_mcssettings* UT_mcssettings::NewLC()
       
   125 {
       
   126     UT_mcssettings* self = new(ELeave) UT_mcssettings();
       
   127     CleanupStack::PushL(self);
       
   128 
       
   129     self->ConstructL();
       
   130 
       
   131     return self;
       
   132 }
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 // Destructor (virtual by CBase)
       
   136 // ---------------------------------------------------------------------------
       
   137 //
       
   138 UT_mcssettings::~UT_mcssettings()
       
   139 {
       
   140 }
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // Default constructor
       
   144 // ---------------------------------------------------------------------------
       
   145 //
       
   146 UT_mcssettings::UT_mcssettings()
       
   147 {
       
   148 }
       
   149 
       
   150 // ---------------------------------------------------------------------------
       
   151 // Second phase construct
       
   152 // ---------------------------------------------------------------------------
       
   153 //
       
   154 void UT_mcssettings::ConstructL()
       
   155 {
       
   156     // The ConstructL from the base class CEUnitTestSuiteClass must be called.
       
   157     // It generates the test case table.
       
   158     CEUnitTestSuiteClass::ConstructL();
       
   159 }
       
   160 
       
   161 //  METHODS
       
   162 
       
   163 // ---------------------------------------------------------------------------
       
   164 //
       
   165 // ---------------------------------------------------------------------------
       
   166 //
       
   167 void UT_mcssettings::SetupL()
       
   168     {
       
   169     //__UHEAP_MARK;
       
   170     iGs = CGSPluginInterface::NewL(TUid::Uid(AI_UID_ECOM_IMPLEMENTATION_SETTINGS_MCSPLUGIN), NULL);
       
   171     iSettingsView = static_cast<CGSBaseView*>(iGs);
       
   172 
       
   173     iAppUi = reinterpret_cast< CAknViewAppUi* >(CEikonEnv::Static()->EikAppUi());
       
   174 
       
   175     iModel = CMCSPluginSettingsModel::NewL(*(CMCSPluginSettings::NewL(NULL)),CEikonEnv::Static());
       
   176     }
       
   177 
       
   178 // ---------------------------------------------------------------------------
       
   179 //
       
   180 // ---------------------------------------------------------------------------
       
   181 //
       
   182 void UT_mcssettings::Teardown()
       
   183     {
       
   184     delete iSettingsView;
       
   185     iSettingsView = NULL;
       
   186 
       
   187     if ( iGs )
       
   188         {
       
   189         iGs = NULL;
       
   190         }
       
   191 
       
   192     if ( iAppList )
       
   193         {
       
   194         delete iAppList;
       
   195         iAppList = NULL;
       
   196         if ( iBkmList )
       
   197             {
       
   198             delete iBkmList;
       
   199             iBkmList = NULL;
       
   200             }
       
   201         
       
   202         iContainer = NULL;
       
   203         }
       
   204     else
       
   205         {
       
   206         if ( iBkmList )
       
   207             {
       
   208             delete iBkmList;
       
   209             iBkmList = NULL;
       
   210             iContainer = NULL;
       
   211             }
       
   212         else
       
   213             {
       
   214             if( iContainer )
       
   215                 {
       
   216                 delete iContainer;
       
   217                 iContainer = NULL;
       
   218                 }
       
   219             }
       
   220         }   
       
   221 
       
   222     if ( iModel )
       
   223         {
       
   224         delete iModel;
       
   225         iModel = NULL;
       
   226         }
       
   227 
       
   228     iItemArray.Reset();
       
   229    //__UHEAP_MARKEND;
       
   230     }
       
   231 
       
   232 // ---------------------------------------------------------------------------
       
   233 //
       
   234 // ---------------------------------------------------------------------------
       
   235 //
       
   236 void UT_mcssettings::emptySetup()
       
   237 {
       
   238 }
       
   239 
       
   240 //----------------------------------------------------------------------------
       
   241 // Tests for CMCSPluginSettings
       
   242 //----------------------------------------------------------------------------
       
   243 
       
   244 // ---------------------------------------------------------------------------
       
   245 //
       
   246 // ---------------------------------------------------------------------------
       
   247 //
       
   248 void UT_mcssettings::UT_Settings_FailL()
       
   249 {
       
   250     TVwsViewId dummyId;
       
   251 
       
   252     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   253     CAOUserAfter::AfterLD(KWait_05_secs);
       
   254 
       
   255     iSettingsView->DoDeactivate();
       
   256     CAOUserAfter::AfterLD(KWait_05_secs);
       
   257 
       
   258     EUNIT_ASSERT(EFalse);
       
   259 }
       
   260 
       
   261 // ---------------------------------------------------------------------------
       
   262 //
       
   263 // ---------------------------------------------------------------------------
       
   264 //
       
   265 void UT_mcssettings::UT_Settings_NewLL()
       
   266 {
       
   267     EUNIT_ASSERT(iSettingsView);
       
   268     iSettingsView->DoDeactivate();
       
   269     CAOUserAfter::AfterLD(KWait_05_secs);
       
   270 }
       
   271 
       
   272 // ---------------------------------------------------------------------------
       
   273 //
       
   274 // ---------------------------------------------------------------------------
       
   275 //
       
   276 void UT_mcssettings::UT_Settings_IdL()
       
   277 {
       
   278     EUNIT_ASSERT_EQUALS(TUid::Uid(AI_UID_ECOM_IMPLEMENTATION_SETTINGS_MCSPLUGIN), iSettingsView->Id());
       
   279     
       
   280     iSettingsView->DoDeactivate();
       
   281     CAOUserAfter::AfterLD(KWait_05_secs);
       
   282 }
       
   283 
       
   284 // ---------------------------------------------------------------------------
       
   285 //
       
   286 // ---------------------------------------------------------------------------
       
   287 //
       
   288 void UT_mcssettings::UT_Settings_HandleCommandLL()
       
   289 {
       
   290     TRAPD(err, iSettingsView->HandleCommandL(EAknSoftkeyExit));
       
   291     EUNIT_ASSERT_EQUALS(err, KErrNone);    
       
   292 }
       
   293 
       
   294 // ---------------------------------------------------------------------------
       
   295 //
       
   296 // ---------------------------------------------------------------------------
       
   297 //
       
   298 void UT_mcssettings::UT_Settings_DoDeactivateL()
       
   299 {
       
   300     TVwsViewId dummyId;
       
   301 
       
   302     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   303     CAOUserAfter::AfterLD(KWait_1_secs);
       
   304 
       
   305     iSettingsView->DoDeactivate();
       
   306     CAOUserAfter::AfterLD(KWait_1_secs);
       
   307     
       
   308 }
       
   309 
       
   310 // ---------------------------------------------------------------------------
       
   311 //
       
   312 // ---------------------------------------------------------------------------
       
   313 //
       
   314 void UT_mcssettings::UT_Settings_GetCaptionLL()
       
   315 {
       
   316     TBuf<50> caption = _L("Shortcuts");
       
   317     TBuf<50> desc;
       
   318 
       
   319     iGs->GetCaptionL(desc);
       
   320 
       
   321     EUNIT_ASSERT_EQUALS(caption, desc);
       
   322     
       
   323     iSettingsView->DoDeactivate();
       
   324     CAOUserAfter::AfterLD(KWait_05_secs);
       
   325 }
       
   326 
       
   327 // ---------------------------------------------------------------------------
       
   328 //
       
   329 // ---------------------------------------------------------------------------
       
   330 //
       
   331 void UT_mcssettings::UT_Settings_PluginProviderCategoryL()
       
   332 {
       
   333     EUNIT_ASSERT_EQUALS(KGSPluginProviderInternal, iGs->PluginProviderCategory());
       
   334     
       
   335     iSettingsView->DoDeactivate();
       
   336     CAOUserAfter::AfterLD(KWait_05_secs);
       
   337 }
       
   338 
       
   339 // ---------------------------------------------------------------------------
       
   340 //
       
   341 // ---------------------------------------------------------------------------
       
   342 //
       
   343 void UT_mcssettings::UT_Settings_VisibleL()
       
   344 {
       
   345     EUNIT_ASSERT_EQUALS(EFalse,iGs->Visible());
       
   346     
       
   347     iSettingsView->DoDeactivate();
       
   348     CAOUserAfter::AfterLD(KWait_05_secs);
       
   349 }
       
   350 
       
   351 // ---------------------------------------------------------------------------
       
   352 //
       
   353 // ---------------------------------------------------------------------------
       
   354 //
       
   355 void UT_mcssettings::SetupAppListL()
       
   356 {
       
   357     SetupL();
       
   358 
       
   359     TVwsViewId dummyId;
       
   360     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   361     CAOUserAfter::AfterLD(KWait_05_secs);
       
   362 
       
   363     iContainer =
       
   364         static_cast<CMCSPluginSettingsContainer*>( iSettingsView->Container() );
       
   365     EUNIT_ASSERT(iContainer);
       
   366 
       
   367     iAppList = CMCSPluginSettingsAppList::NewL();
       
   368 
       
   369     iAppList->StartL();
       
   370 
       
   371     //while (!iAppList->IsReady())
       
   372     {
       
   373         CAOUserAfter::AfterLD(KWait_05_secs);
       
   374     }
       
   375 }
       
   376 
       
   377 // ---------------------------------------------------------------------------
       
   378 //
       
   379 // ---------------------------------------------------------------------------
       
   380 //
       
   381 void UT_mcssettings::TeardownAppList()
       
   382 {
       
   383     iSettingsView->DoDeactivate();
       
   384     CAOUserAfter::AfterLD(KWait_05_secs);
       
   385     Teardown();
       
   386 }
       
   387 
       
   388 // ---------------------------------------------------------------------------
       
   389 //
       
   390 // ---------------------------------------------------------------------------
       
   391 //
       
   392 void UT_mcssettings::UT_SettingsAppList_NewLL()
       
   393 {
       
   394     EUNIT_ASSERT(iAppList);
       
   395 }
       
   396 
       
   397 // ---------------------------------------------------------------------------
       
   398 //
       
   399 // ---------------------------------------------------------------------------
       
   400 //
       
   401 void UT_mcssettings::UT_SettingsAppList_MdcaCountL()
       
   402 {
       
   403     TVwsViewId dummyId;
       
   404     TInt count;
       
   405 
       
   406     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   407     CAOUserAfter::AfterLD(KWait_05_secs);
       
   408 
       
   409     iContainer =
       
   410         static_cast<CMCSPluginSettingsContainer*>( iSettingsView->Container() );
       
   411     EUNIT_ASSERT(iContainer);
       
   412 
       
   413     iAppList = CMCSPluginSettingsAppList::NewL();
       
   414     count = iAppList->MdcaCount();
       
   415     iAppList->StartL();
       
   416 
       
   417     //while (!iAppList->IsReady())
       
   418     {
       
   419         CAOUserAfter::AfterLD(KWait_05_secs);
       
   420     }
       
   421 
       
   422     EUNIT_ASSERT_NOT_EQUALS(count, iAppList->MdcaCount());
       
   423 
       
   424 }
       
   425 
       
   426 // ---------------------------------------------------------------------------
       
   427 //
       
   428 // ---------------------------------------------------------------------------
       
   429 //
       
   430 void UT_mcssettings::UT_SettingsAppList_MdcaPointL()
       
   431 {
       
   432     TPtrC ret(KNullDesC);
       
   433     EUNIT_ASSERT_EQUALS(ret,iAppList->MdcaPoint(-1));
       
   434     
       
   435     EUNIT_ASSERT_EQUALS(ret,iAppList->MdcaPoint(208));
       
   436     
       
   437     TBufC<30> buf = iAppList->MdcaPoint(0);
       
   438     
       
   439     EUNIT_ASSERT(buf.Length() > 0);
       
   440 }
       
   441 
       
   442 // ---------------------------------------------------------------------------
       
   443 //
       
   444 // ---------------------------------------------------------------------------
       
   445 //
       
   446 void UT_mcssettings::UT_SettingsAppList_HandleSessionEventLL()
       
   447     {
       
   448     TAny* dummy = NULL;
       
   449 
       
   450     for (TInt i = 0; i < 10; i++)
       
   451         {
       
   452         TRAPD(err,
       
   453               iAppList->HandleSessionEventL(
       
   454                   MMsvSessionObserver::TMsvSessionEvent(i),
       
   455                   dummy,
       
   456                   dummy,
       
   457                   dummy) );
       
   458         EUNIT_ASSERT_EQUALS(err, KErrNone);
       
   459         }
       
   460     }
       
   461 
       
   462 
       
   463 // ---------------------------------------------------------------------------
       
   464 //
       
   465 // ---------------------------------------------------------------------------
       
   466 //
       
   467 void UT_mcssettings::SetupBkmListL()
       
   468 {
       
   469     SetupL();
       
   470 
       
   471     TVwsViewId dummyId;
       
   472     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   473     CAOUserAfter::AfterLD(KWait_05_secs);
       
   474 
       
   475     iContainer =
       
   476         static_cast<CMCSPluginSettingsContainer*>( iSettingsView->Container() );
       
   477     EUNIT_ASSERT(iContainer);
       
   478     
       
   479     iBkmList = CMCSPluginSettingsBkmList::NewL();
       
   480     CAOUserAfter::AfterLD(KWait_05_secs);
       
   481     
       
   482 }
       
   483 
       
   484 // ---------------------------------------------------------------------------
       
   485 //
       
   486 // ---------------------------------------------------------------------------
       
   487 //
       
   488 void UT_mcssettings::TeardownBkmList()
       
   489 {
       
   490     if ( iRemoveWatcher )
       
   491         {
       
   492         delete iRemoveWatcher;
       
   493         iRemoveWatcher = NULL;
       
   494         }
       
   495     if ( iSaveWatcher )
       
   496         {
       
   497         delete iSaveWatcher;
       
   498         iSaveWatcher = NULL;
       
   499         }
       
   500 
       
   501     iMenu.Close();
       
   502     iSettingsView->DoDeactivate();
       
   503     CAOUserAfter::AfterLD(KWait_05_secs);
       
   504     Teardown();
       
   505 }
       
   506 
       
   507 // ---------------------------------------------------------------------------
       
   508 //
       
   509 // ---------------------------------------------------------------------------
       
   510 //
       
   511 void UT_mcssettings::UT_SettingsBkmList_NewLL()
       
   512 {
       
   513     EUNIT_ASSERT(iBkmList);
       
   514 }
       
   515 
       
   516 // ---------------------------------------------------------------------------
       
   517 //
       
   518 // ---------------------------------------------------------------------------
       
   519 //
       
   520 void UT_mcssettings::UT_SettingsBkmList_MdcaCountL()
       
   521 {
       
   522     TInt count1( -1 );
       
   523     iBkmList->GetBookmarkListL();
       
   524     count1 = iBkmList->MdcaCount();
       
   525 
       
   526     RFavouritesSession bookmarkSess;
       
   527     RFavouritesDb bookmarkDb;
       
   528 
       
   529     User::LeaveIfError( bookmarkSess.Connect() );
       
   530     User::LeaveIfError(bookmarkDb.Open( bookmarkSess, KBrowserBookmarks) );
       
   531     iMenu.OpenL( KMyMenuData );
       
   532 
       
   533     CMenuFilter* filter = CMenuFilter::NewL();
       
   534     CleanupStack::PushL( filter );
       
   535     filter->SetType( KMenuUrl );
       
   536     const TInt rootId = iMenu.RootFolderL();
       
   537 
       
   538     RArray<TMenuItem> itemArray;
       
   539     CleanupClosePushL( itemArray );
       
   540     iMenu.GetItemsL( itemArray, rootId, filter, ETrue );
       
   541     TInt countmenu( itemArray.Count() );
       
   542 
       
   543     CFavouritesItemList* favItems = new ( ELeave ) CFavouritesItemList();
       
   544     CleanupStack::PushL( favItems );
       
   545     TInt err = bookmarkDb.GetAll( *favItems, KFavouritesNullUid,
       
   546                                   CFavouritesItem::EItem );
       
   547     if( err != KErrNone )
       
   548        {
       
   549        EUNIT_ASSERT( 0 );
       
   550        }
       
   551     TInt countfav = favItems->Count();
       
   552 
       
   553     EUNIT_ASSERT_EQUALS( countfav + countmenu, count1 );
       
   554 
       
   555     CleanupStack::PopAndDestroy( favItems );  
       
   556     CleanupStack::PopAndDestroy( &itemArray );
       
   557     CleanupStack::PopAndDestroy( filter );  
       
   558          
       
   559     bookmarkDb.Close();
       
   560     bookmarkSess.Close();
       
   561 }
       
   562 
       
   563 // ---------------------------------------------------------------------------
       
   564 //
       
   565 // ---------------------------------------------------------------------------
       
   566 //
       
   567 void UT_mcssettings::UT_SettingsBkmList_MdcaPointL()
       
   568 {
       
   569     iBkmList->GetBookmarkListL();
       
   570     
       
   571     TPtrC ret(KNullDesC);
       
   572     EUNIT_ASSERT_EQUALS(ret,iBkmList->MdcaPoint(-1));
       
   573     
       
   574     EUNIT_ASSERT_EQUALS(ret,iBkmList->MdcaPoint(200));
       
   575     
       
   576     if ( iBkmList->MdcaCount() > 0 )
       
   577         {
       
   578         TBufC<30> buf = iBkmList->MdcaPoint(0);
       
   579         EUNIT_ASSERT(buf.Length() > 0);
       
   580         }
       
   581 }
       
   582 
       
   583 
       
   584 // ---------------------------------------------------------------------------
       
   585 //
       
   586 // ---------------------------------------------------------------------------
       
   587 //
       
   588 void UT_mcssettings::UT_SettingsContainer_IsChangeDialogShowingL()
       
   589 {
       
   590     TRAPD(err, iContainer = new (ELeave) CMCSPluginSettingsContainer);
       
   591     EUNIT_ASSERT_EQUALS(err, KErrNone);
       
   592 
       
   593     iSettingsView->DoDeactivate();
       
   594     CAOUserAfter::AfterLD(KWait_05_secs);
       
   595 }
       
   596 
       
   597 // ---------------------------------------------------------------------------
       
   598 //
       
   599 // ---------------------------------------------------------------------------
       
   600 //
       
   601 void UT_mcssettings::UT_SettingsContainer_CloseChangeDialogL()
       
   602 {
       
   603     TRAPD(err, iContainer = new (ELeave) CMCSPluginSettingsContainer);
       
   604     EUNIT_ASSERT_EQUALS(err, KErrNone);
       
   605 
       
   606     iContainer->CloseChangeDialog();
       
   607     iSettingsView->DoDeactivate();
       
   608     CAOUserAfter::AfterLD(KWait_05_secs);
       
   609 }
       
   610 
       
   611 
       
   612 // ---------------------------------------------------------------------------
       
   613 //
       
   614 // ---------------------------------------------------------------------------
       
   615 //
       
   616 
       
   617 void UT_mcssettings::UT_SettingsModel_NewLL()
       
   618 {
       
   619     EUNIT_ASSERT(iModel);
       
   620     iSettingsView->DoDeactivate();
       
   621     CAOUserAfter::AfterLD(KWait_05_secs);
       
   622 }
       
   623 
       
   624 // ---------------------------------------------------------------------------
       
   625 //
       
   626 // ---------------------------------------------------------------------------
       
   627 //
       
   628 void UT_mcssettings::UT_SettingsModel_MdcaCountL()
       
   629 {
       
   630     EUNIT_ASSERT_NOT_EQUALS(NULL, iModel->MdcaCount());
       
   631     iSettingsView->DoDeactivate();
       
   632     CAOUserAfter::AfterLD(KWait_05_secs);
       
   633 }
       
   634 
       
   635 // ---------------------------------------------------------------------------
       
   636 //
       
   637 // ---------------------------------------------------------------------------
       
   638 //
       
   639 void UT_mcssettings::UT_SettingsModel_MdcaPointL()
       
   640     {
       
   641     TInt outtaBounds = 2;
       
   642 
       
   643     for ( TInt i = -1; i < iModel->MdcaCount() + outtaBounds; i++ )
       
   644     {
       
   645         if ( i < 0 || i >= iModel->MdcaCount() )
       
   646             {
       
   647             EUNIT_ASSERT_EQUALS( TPtrC( KNullDesC16 ),
       
   648                                  iModel->MdcaPoint( i ) );
       
   649             }
       
   650         else
       
   651             {
       
   652             TPtrC desc = iModel->MdcaPoint( i );
       
   653             EUNIT_ASSERT_NOT_EQUALS( desc.Length(), NULL );
       
   654             }
       
   655     }
       
   656     iSettingsView->DoDeactivate();
       
   657     CAOUserAfter::AfterLD( KWait_05_secs );
       
   658     }
       
   659 
       
   660 // ---------------------------------------------------------------------------
       
   661 //
       
   662 // ---------------------------------------------------------------------------
       
   663 //
       
   664 void UT_mcssettings::UT_SettingsAppList_ItemL()
       
   665     {
       
   666     CMenuItem* menuItem;
       
   667     TInt maxIndex = iAppList->MdcaCount();
       
   668 
       
   669     if ( maxIndex > 0 )
       
   670         {
       
   671         menuItem = iAppList->ItemL( maxIndex - 1 );
       
   672         EUNIT_ASSERT( menuItem );
       
   673         }
       
   674 
       
   675     maxIndex = -1;
       
   676     menuItem = iAppList->ItemL( maxIndex );
       
   677 
       
   678     EUNIT_ASSERT_EQUALS( menuItem == NULL, ETrue );
       
   679     }
       
   680 
       
   681 // ---------------------------------------------------------------------------
       
   682 //
       
   683 // ---------------------------------------------------------------------------
       
   684 //
       
   685 void UT_mcssettings::UT_SettingsAppList_FindItemL()
       
   686     {
       
   687     RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
       
   688     CleanupResetAndDestroyPushL( properties );
       
   689     HSPluginSettingsIf::CPropertyMap* typePropertyMap = 
       
   690         HSPluginSettingsIf::CPropertyMap::NewL();
       
   691     CleanupStack::PushL( typePropertyMap );
       
   692     typePropertyMap->SetNameL( _L8( "type" ) );
       
   693     typePropertyMap->SetValueL( _L8( "application" ) );
       
   694     properties.AppendL( typePropertyMap );
       
   695     CleanupStack::Pop( typePropertyMap );
       
   696 
       
   697     HSPluginSettingsIf::CPropertyMap* uidPropertyMap = 
       
   698         HSPluginSettingsIf::CPropertyMap::NewL();
       
   699     CleanupStack::PushL( uidPropertyMap );
       
   700     uidPropertyMap->SetNameL(  _L8( "uid" ) );
       
   701     uidPropertyMap->SetValueL( _L8( "0xeeeebbbb" ) );
       
   702     properties.AppendL( uidPropertyMap );
       
   703     CleanupStack::Pop( uidPropertyMap );
       
   704 
       
   705     TSettingItem setting = iAppList->FindItemL( properties );
       
   706     EUNIT_ASSERT_EQUALS( setting.id == KErrNotFound, ETrue );
       
   707 
       
   708     CleanupStack::PopAndDestroy();    //properties
       
   709     }
       
   710 
       
   711 // ---------------------------------------------------------------------------
       
   712 //
       
   713 // ---------------------------------------------------------------------------
       
   714 //
       
   715 void UT_mcssettings::UT_SettingsBkmList_ItemL()
       
   716     {
       
   717     TInt maxIndex = iBkmList->MdcaCount();
       
   718     CMenuItem* menu( NULL );
       
   719     if ( maxIndex > 0 )
       
   720         {
       
   721         menu = iBkmList->ItemL( maxIndex - 1 );
       
   722         EUNIT_ASSERT_EQUALS( menu != NULL, ETrue );
       
   723         }
       
   724     }
       
   725 
       
   726 // ---------------------------------------------------------------------------
       
   727 //
       
   728 // ---------------------------------------------------------------------------
       
   729 //
       
   730 void UT_mcssettings::UT_SettingsBkmList_FindItemL()
       
   731     {
       
   732     RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
       
   733     CleanupResetAndDestroyPushL( properties );
       
   734 
       
   735     HSPluginSettingsIf::CPropertyMap* myCPropertyMap = 
       
   736         HSPluginSettingsIf::CPropertyMap::NewL();
       
   737     CleanupStack::PushL( myCPropertyMap );
       
   738     myCPropertyMap->SetNameL( _L8( "uid" ) );
       
   739     myCPropertyMap->SetValueL( _L8( "0xeeeebbbb" ) );
       
   740     properties.AppendL( myCPropertyMap );
       
   741     CleanupStack::Pop( myCPropertyMap );
       
   742 
       
   743     TSettingItem setting = iBkmList->FindItemL( properties );
       
   744     EUNIT_ASSERT_EQUALS( setting.id == KErrNotFound, ETrue );
       
   745     CleanupStack::PopAndDestroy();    //properties
       
   746     }
       
   747 
       
   748 // ---------------------------------------------------------------------------
       
   749 //
       
   750 // ---------------------------------------------------------------------------
       
   751 //
       
   752 void UT_mcssettings::UT_SettingsContainer_ResetCurrrentListL()
       
   753     {
       
   754     TRAPD(err, iContainer->ResetCurrentListL( 0 ) );
       
   755     EUNIT_ASSERT_EQUALS( err, KErrNone );
       
   756     }
       
   757 
       
   758 // ---------------------------------------------------------------------------
       
   759 //
       
   760 // ---------------------------------------------------------------------------
       
   761 //
       
   762 void UT_mcssettings::UT_SettingsModel_AppList()
       
   763     {
       
   764     EUNIT_ASSERT( iModel->AppList() );
       
   765     }
       
   766 
       
   767 // ---------------------------------------------------------------------------
       
   768 //
       
   769 // ---------------------------------------------------------------------------
       
   770 //
       
   771 void UT_mcssettings::UT_SettingsModel_BkmList()
       
   772     {
       
   773     EUNIT_ASSERT( iModel->BkmList() );
       
   774     }
       
   775 
       
   776 // ---------------------------------------------------------------------------
       
   777 //
       
   778 // ---------------------------------------------------------------------------
       
   779 //
       
   780 void UT_mcssettings::UT_SettingsModel_ItemId()
       
   781     {
       
   782     TInt indexMax = iModel->MdcaCount(); 
       
   783     TInt indexID( 0 );
       
   784     
       
   785     if ( indexMax > 0 )
       
   786         {
       
   787         indexID = iModel->ItemId( indexMax - 1 );
       
   788         EUNIT_ASSERT_EQUALS( indexID != KErrNotFound, ETrue );
       
   789         }
       
   790     }
       
   791 
       
   792 // ---------------------------------------------------------------------------
       
   793 //
       
   794 // ---------------------------------------------------------------------------
       
   795 //
       
   796 void UT_mcssettings::UT_SettingsModel_Item()
       
   797     {
       
   798     TSettingItem setting;
       
   799     TInt indexMax = iModel->MdcaCount(); 
       
   800     if ( indexMax > 0 )
       
   801         {
       
   802         setting = iModel->Item( indexMax - 1 );    
       
   803         EUNIT_ASSERT_EQUALS( setting.id != KErrNotFound, ETrue );
       
   804         }
       
   805     }
       
   806 
       
   807 // ---------------------------------------------------------------------------
       
   808 //
       
   809 // ---------------------------------------------------------------------------
       
   810 //
       
   811 void UT_mcssettings::UT_SettingsModel_ReplaceItemL()
       
   812     {
       
   813     TInt indexMax = iModel->MdcaCount();
       
   814     TSettingItem setting;
       
   815 
       
   816     if ( indexMax > 0 )
       
   817         {
       
   818         setting = iModel->Item( indexMax - 1 );
       
   819         if ( setting.id != KErrNotFound )
       
   820             {
       
   821              TBool err = iModel->ReplaceItemL( indexMax - 1,
       
   822                                                setting.id,
       
   823                                                setting.type );
       
   824             EUNIT_ASSERT( err );
       
   825             }
       
   826         }
       
   827     }
       
   828 
       
   829 // ---------------------------------------------------------------------------
       
   830 //
       
   831 // ---------------------------------------------------------------------------
       
   832 //
       
   833 void UT_mcssettings::SetupModelL()
       
   834     {
       
   835     SetupL();
       
   836 
       
   837     iModel->SetPluginIdL( KPluginId );
       
   838     iModel->UpdateAppListL();
       
   839     iModel->UpdateBkmListL();
       
   840     CAOUserAfter::AfterLD( KWait_05_secs );
       
   841     }
       
   842 
       
   843 // ---------------------------------------------------------------------------
       
   844 //
       
   845 // ---------------------------------------------------------------------------
       
   846 //
       
   847 void UT_mcssettings::SetupContainerL()
       
   848     {
       
   849     SetupL();
       
   850     TVwsViewId dummyId;
       
   851     iSettingsView->DoActivateL(dummyId, KNullUid, KNullDesC8);
       
   852     CAOUserAfter::AfterLD( KWait_05_secs );
       
   853 
       
   854     iContainer =
       
   855         static_cast<CMCSPluginSettingsContainer*>( iSettingsView->Container() );
       
   856     EUNIT_ASSERT(iContainer);
       
   857     }
       
   858 
       
   859 // ---------------------------------------------------------------------------
       
   860 //
       
   861 // ---------------------------------------------------------------------------
       
   862 //
       
   863 void UT_mcssettings::UT_SettingsContainer_HandleNotifyL()
       
   864     {
       
   865     iMenu.OpenL( KMyMenuData );
       
   866     CMenuItem* newItem = CMenuItem::CreateL( iMenu, KMenuTypeApp, 1, 0 );
       
   867     CleanupStack::PushL( newItem );
       
   868     newItem->SetAttributeL( KMenuAttrUid, KUid );
       
   869     newItem->SetAttributeL( KMenuAttrLongName, KName );
       
   870   
       
   871     iSaveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
       
   872     //add menu item
       
   873     CMenuOperation* operationSave = newItem->SaveL( iSaveWatcher->iStatus );
       
   874     iSaveWatcher->Watch( operationSave );            
       
   875     CAOUserAfter::AfterLD( KWait_05_secs );
       
   876     //remove menu item 
       
   877     iRemoveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
       
   878     CMenuOperation* operationRemove = iMenu.RemoveL( newItem->Id(),
       
   879         iRemoveWatcher->iStatus );
       
   880     iRemoveWatcher->Watch( operationRemove );
       
   881     CAOUserAfter::AfterLD( KWait_05_secs );
       
   882 
       
   883     CleanupStack::PopAndDestroy( newItem );
       
   884     }
       
   885 
       
   886 // ---------------------------------------------------------------------------
       
   887 //
       
   888 // ---------------------------------------------------------------------------
       
   889 //
       
   890 void UT_mcssettings::TeardownContainer()
       
   891     {
       
   892     if ( iRemoveWatcher )
       
   893         {
       
   894         delete iRemoveWatcher;
       
   895         iRemoveWatcher = NULL;
       
   896         }
       
   897     if ( iSaveWatcher )
       
   898         {
       
   899         delete iSaveWatcher;
       
   900         iSaveWatcher = NULL;
       
   901         }
       
   902 
       
   903     iSettingsView->DoDeactivate();
       
   904     CAOUserAfter::AfterLD( KWait_05_secs );
       
   905     iContainer = NULL;
       
   906     iMenu.Close();
       
   907     Teardown();
       
   908     }
       
   909 
       
   910 // ---------------------------------------------------------------------------
       
   911 //
       
   912 // ---------------------------------------------------------------------------
       
   913 //
       
   914 void UT_mcssettings::UT_SettingsBkmList_MCSMenuItemL()
       
   915     {
       
   916     iMenu.OpenL( KMyMenuData );
       
   917     CMenuItem* newItem = CMenuItem::CreateL( iMenu, KMenuTypeUrl, 1, 0 );
       
   918     CleanupStack::PushL( newItem );
       
   919     newItem->SetAttributeL( KMenuAttrUid, KUidMCSB16 );
       
   920     newItem->SetAttributeL( KMenuAttrLongName, KName );
       
   921     newItem->SetAttributeL( KMenuAttrUrl, KUrl );
       
   922 
       
   923     //add menu item - EMCSBookmark
       
   924     iSaveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
       
   925     CMenuOperation* operationSave = newItem->SaveL( iSaveWatcher->iStatus );
       
   926     iSaveWatcher->Watch( operationSave );
       
   927     CAOUserAfter::AfterLD( KWait_05_secs );
       
   928 
       
   929     iBkmList->GetBookmarkListL();
       
   930     RPointerArray<HSPluginSettingsIf::CPropertyMap> properties;
       
   931     CleanupClosePushL( properties );
       
   932     HSPluginSettingsIf::CPropertyMap* myCPropertyMap = 
       
   933         HSPluginSettingsIf::CPropertyMap::NewL();
       
   934 
       
   935     CleanupStack::PushL( myCPropertyMap );
       
   936     myCPropertyMap->SetNameL( _L8( "uid" ) );
       
   937     myCPropertyMap->SetValueL( KUidMCSB8 ); 
       
   938     properties.AppendL( myCPropertyMap );
       
   939     CleanupStack::Pop( myCPropertyMap );
       
   940 
       
   941     TSettingItem setting = iBkmList->FindItemL( properties );
       
   942     CleanupStack::PopAndDestroy( &properties );
       
   943     CMenuItem* menuItem = iBkmList->ItemL( setting.id );
       
   944 
       
   945     EUNIT_ASSERT( menuItem );
       
   946 
       
   947     //remove menu item - EMCSBookmark 
       
   948     iRemoveWatcher = CMCSPluginWatcher::NewL( CMCSPluginWatcher::EOperation );
       
   949     CMenuOperation* operationRemove = iMenu.RemoveL( newItem->Id(),
       
   950         iRemoveWatcher->iStatus );
       
   951     iRemoveWatcher->Watch( operationRemove );
       
   952     CAOUserAfter::AfterLD( KWait_05_secs );
       
   953 
       
   954     CleanupStack::PopAndDestroy( newItem );
       
   955     }
       
   956 
       
   957 // ---------------------------------------------------------------------------
       
   958 //
       
   959 // ---------------------------------------------------------------------------
       
   960 //
       
   961 void UT_mcssettings::UT_SettingsModel_UndefinedText()
       
   962     {
       
   963     TPtrC undefinedT = iModel->AppList()->UndefinedText();
       
   964     EUNIT_ASSERT( &undefinedT != NULL );
       
   965     }
       
   966 
       
   967 void UT_mcssettings::UT_SettingsContainer_HandleHelpCommandL()
       
   968     {
       
   969     iContainer->HandleHelpCommandL();
       
   970     CAOUserAfter::AfterLD( KWait_05_secs );
       
   971 
       
   972     TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
       
   973     TApaTask task = taskList.FindApp( KHlpAppUid );
       
   974 
       
   975     EUNIT_ASSERT( task.Exists() );
       
   976 
       
   977     if ( task.Exists() )
       
   978         {
       
   979         task.EndTask();
       
   980         }
       
   981     }
       
   982 
       
   983 
       
   984 
       
   985 //  TEST TABLE
       
   986 EUNIT_BEGIN_TEST_TABLE
       
   987     (
       
   988     UT_mcssettings,
       
   989     "MCS plugin settings tests.",
       
   990     "UNIT"
       
   991     )
       
   992 
       
   993 /*EUNIT_TEST
       
   994     (
       
   995     "Fail",
       
   996     "Settings",
       
   997     "Fail",
       
   998     "FUNCTIONALITY",
       
   999     SetupL, UT_Settings_FailL, Teardown
       
  1000     )
       
  1001 */
       
  1002 
       
  1003 EUNIT_TEST
       
  1004     (
       
  1005     "NewL",
       
  1006     "Settings",
       
  1007     "NewL",
       
  1008     "FUNCTIONALITY",
       
  1009     SetupL, UT_Settings_NewLL, Teardown
       
  1010     )
       
  1011 
       
  1012 EUNIT_TEST
       
  1013     (
       
  1014     "Id",
       
  1015     "Settings",
       
  1016     "Id",
       
  1017     "FUNCTIONALITY",
       
  1018     SetupL, UT_Settings_IdL, Teardown
       
  1019     )
       
  1020 
       
  1021 EUNIT_TEST
       
  1022     (
       
  1023     "DoDeactivate",
       
  1024     "Settings",
       
  1025     "DoDeactivate",
       
  1026     "FUNCTIONALITY",
       
  1027     SetupL, UT_Settings_DoDeactivateL, Teardown
       
  1028     )
       
  1029 
       
  1030 EUNIT_TEST
       
  1031     (
       
  1032     "GetCaptionL",
       
  1033     "Settings",
       
  1034     "GetCaptionL",
       
  1035     "FUNCTIONALITY",
       
  1036     SetupL, UT_Settings_GetCaptionLL, Teardown
       
  1037     )
       
  1038 
       
  1039 EUNIT_TEST
       
  1040     (
       
  1041     "PluginProviderCategory",
       
  1042     "Settings",
       
  1043     "PluginProviderCategory",
       
  1044     "FUNCTIONALITY",
       
  1045     SetupL, UT_Settings_PluginProviderCategoryL, Teardown
       
  1046     )
       
  1047 
       
  1048 EUNIT_TEST
       
  1049     (
       
  1050     "Visible",
       
  1051     "Settings",
       
  1052     "Visible",
       
  1053     "FUNCTIONALITY",
       
  1054     SetupL, UT_Settings_VisibleL, Teardown
       
  1055     )
       
  1056 
       
  1057 EUNIT_TEST
       
  1058     (
       
  1059     "NewL",
       
  1060     "SettingsAppList",
       
  1061     "NewL",
       
  1062     "FUNCTIONALITY",
       
  1063     SetupAppListL, UT_SettingsAppList_NewLL, TeardownAppList
       
  1064     )
       
  1065 
       
  1066 EUNIT_TEST
       
  1067     (
       
  1068     "MdcaCount",
       
  1069     "SettingsAppList",
       
  1070     "MdcaCount",
       
  1071     "FUNCTIONALITY",
       
  1072     SetupL, UT_SettingsAppList_MdcaCountL, TeardownAppList
       
  1073     )
       
  1074 
       
  1075 EUNIT_TEST
       
  1076     (
       
  1077     "MdcaPoint",
       
  1078     "SettingsAppList",
       
  1079     "MdcaPointL",
       
  1080     "FUNCTIONALITY",
       
  1081     SetupAppListL, UT_SettingsAppList_MdcaPointL, TeardownAppList
       
  1082     )
       
  1083 
       
  1084 EUNIT_TEST
       
  1085     (
       
  1086     "HandleSessionEventL",
       
  1087     "SettingsAppList",
       
  1088     "HandleSessionEventL",
       
  1089     "FUNCTIONALITY",
       
  1090     SetupAppListL, UT_SettingsAppList_HandleSessionEventLL, TeardownAppList
       
  1091     )
       
  1092 
       
  1093 EUNIT_TEST
       
  1094     (
       
  1095     "BkmNewL",
       
  1096     "SettingsBkmList",
       
  1097     "NewL",
       
  1098     "FUNCTIONALITY",
       
  1099     SetupBkmListL, UT_SettingsBkmList_NewLL, TeardownBkmList
       
  1100     )
       
  1101 
       
  1102 EUNIT_TEST
       
  1103     (
       
  1104     "BkmMdcaCount",
       
  1105     "SettingsBkmList",
       
  1106     "MdcaCount",
       
  1107     "FUNCTIONALITY",
       
  1108     SetupBkmListL, UT_SettingsBkmList_MdcaCountL, TeardownBkmList
       
  1109     )
       
  1110 
       
  1111 EUNIT_TEST
       
  1112     (
       
  1113     "BkmMdcaPoint",
       
  1114     "SettingsBkmList",
       
  1115     "MdcaPointL",
       
  1116     "FUNCTIONALITY",
       
  1117     SetupBkmListL, UT_SettingsBkmList_MdcaPointL, TeardownBkmList
       
  1118     )
       
  1119 
       
  1120 EUNIT_TEST
       
  1121     (
       
  1122     "IsChangeDialogShowing",
       
  1123     "SettingsContainer",
       
  1124     "IsChangeDialogShowing",
       
  1125     "FUNCTIONALITY",
       
  1126     SetupL, UT_SettingsContainer_IsChangeDialogShowingL, Teardown
       
  1127     )
       
  1128 
       
  1129 EUNIT_TEST
       
  1130     (
       
  1131     "CloseChangeDialog",
       
  1132     "SettingsContainer",
       
  1133     "CloseChangeDialog",
       
  1134     "FUNCTIONALITY",
       
  1135     SetupL, UT_SettingsContainer_CloseChangeDialogL, Teardown
       
  1136     )
       
  1137 
       
  1138 EUNIT_TEST
       
  1139     (
       
  1140     "NewL",
       
  1141     "SettingsModel",
       
  1142     "NewL",
       
  1143     "FUNCTIONALITY",
       
  1144     SetupL, UT_SettingsModel_NewLL, Teardown
       
  1145     )
       
  1146 
       
  1147 EUNIT_TEST
       
  1148     (
       
  1149     "MdcaPoint",
       
  1150     "SettingsModel",
       
  1151     "MdcaPoint",
       
  1152     "FUNCTIONALITY",
       
  1153     SetupModelL, UT_SettingsModel_MdcaPointL, Teardown
       
  1154     )
       
  1155 
       
  1156 EUNIT_TEST
       
  1157     (
       
  1158     "App ItemL",
       
  1159     "SettingsAppList",
       
  1160     "ItemL",
       
  1161     "FUNCTIONALITY",
       
  1162     SetupAppListL, UT_SettingsAppList_ItemL, TeardownAppList
       
  1163     )
       
  1164 
       
  1165 EUNIT_TEST
       
  1166     (
       
  1167     "App FindItemL",
       
  1168     "SettingsAppList",
       
  1169     "FindItemL",
       
  1170     "FUNCTIONALITY",
       
  1171     SetupAppListL, UT_SettingsAppList_FindItemL, TeardownAppList
       
  1172     )
       
  1173 
       
  1174 EUNIT_TEST
       
  1175     (
       
  1176     "Bkm ItemL",
       
  1177     "SettingsBkmList",
       
  1178     "ItemL",
       
  1179     "FUNCTIONALITY",
       
  1180     SetupBkmListL, UT_SettingsBkmList_ItemL, TeardownBkmList
       
  1181     )
       
  1182 
       
  1183 EUNIT_TEST
       
  1184     (
       
  1185     "Bkm FindItemL",
       
  1186     "SettingsBkmList",
       
  1187     "FindItemL",
       
  1188     "FUNCTIONALITY",
       
  1189     SetupBkmListL, UT_SettingsBkmList_FindItemL, TeardownBkmList
       
  1190     )
       
  1191 
       
  1192 EUNIT_TEST
       
  1193     (
       
  1194     "ResetCurrrentListL",
       
  1195     "SettingsContainer",
       
  1196     "ResetCurrrentListL",
       
  1197     "FUNCTIONALITY",
       
  1198     SetupContainerL, UT_SettingsContainer_ResetCurrrentListL, TeardownContainer
       
  1199     )
       
  1200 
       
  1201 EUNIT_TEST
       
  1202     (
       
  1203     "HandleCommandL",
       
  1204     "Settings",
       
  1205     "HandleCommandL",
       
  1206     "FUNCTIONALITY",
       
  1207     SetupL, UT_Settings_HandleCommandLL, Teardown
       
  1208     )
       
  1209 
       
  1210 EUNIT_TEST
       
  1211     (
       
  1212     "AppList",
       
  1213     "SettingsModel",
       
  1214     "AppList",
       
  1215     "FUNCTIONALITY",
       
  1216     SetupModelL, UT_SettingsModel_AppList, Teardown
       
  1217     )
       
  1218 
       
  1219 EUNIT_TEST
       
  1220     (
       
  1221     "BkmList",
       
  1222     "SettingsModel",
       
  1223     "BkmList",
       
  1224     "FUNCTIONALITY",
       
  1225     SetupModelL, UT_SettingsModel_BkmList, Teardown
       
  1226     )
       
  1227 
       
  1228 EUNIT_TEST
       
  1229     (
       
  1230     "ItemId",
       
  1231     "SettingsModel",
       
  1232     "ItemId",
       
  1233     "FUNCTIONALITY",
       
  1234     SetupModelL, UT_SettingsModel_ItemId, Teardown
       
  1235     )
       
  1236 
       
  1237 EUNIT_TEST
       
  1238     (
       
  1239     "Item",
       
  1240     "SettingsModel",
       
  1241     "Item",
       
  1242     "FUNCTIONALITY",
       
  1243     SetupModelL, UT_SettingsModel_Item, Teardown
       
  1244     )
       
  1245 
       
  1246 EUNIT_TEST
       
  1247     (
       
  1248     "ReplaceItemL",
       
  1249     "SettingsModel",
       
  1250     "ReplaceItemL",
       
  1251     "FUNCTIONALITY",
       
  1252     SetupModelL, UT_SettingsModel_ReplaceItemL, Teardown
       
  1253     )
       
  1254 
       
  1255 EUNIT_TEST
       
  1256     (
       
  1257     "HandleNotifyL",
       
  1258     "SettingsContainer",
       
  1259     "HandleNotifyL",
       
  1260     "FUNCTIONALITY",
       
  1261     SetupContainerL, UT_SettingsContainer_HandleNotifyL, TeardownContainer
       
  1262     )
       
  1263 
       
  1264 EUNIT_TEST
       
  1265     (
       
  1266     "MCSMenuItemL",
       
  1267     "SettingsBkmList",
       
  1268     "MCSMenuItemL",
       
  1269     "FUNCTIONALITY",
       
  1270     SetupBkmListL, UT_SettingsBkmList_MCSMenuItemL, TeardownBkmList
       
  1271     )
       
  1272     
       
  1273 EUNIT_TEST
       
  1274     (
       
  1275     "UndefinedText",
       
  1276     "SettingsModel",
       
  1277     "UndefinedText",
       
  1278     "FUNCTIONALITY",
       
  1279     SetupModelL, UT_SettingsModel_UndefinedText, Teardown
       
  1280     )
       
  1281     
       
  1282 EUNIT_TEST
       
  1283     (
       
  1284     "HandleHelpCommandL",
       
  1285     "SettingsModel",
       
  1286     "HandleHelpCommandL",
       
  1287     "FUNCTIONALITY",
       
  1288     SetupContainerL, UT_SettingsContainer_HandleHelpCommandL, TeardownContainer
       
  1289     )
       
  1290 
       
  1291 EUNIT_END_TEST_TABLE
       
  1292 
       
  1293 //  END OF FILE