controlpanel/tsrc/unit/ut_cpsettingformentryitemdata/src/ut_cpsettingformentryitemdata.cpp
changeset 55 4c15d9aa2384
equal deleted inserted replaced
47:dbe66a66f6a9 55:4c15d9aa2384
       
     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 *       test application for qt control panel public apis.
       
    16 */
       
    17 
       
    18 #include "ut_cpsettingformentryitemdata.h"
       
    19 
       
    20 #include "mycpsettingformentryitemdata.h"
       
    21 
       
    22 #include <cpsettingformentryitemdata.h>
       
    23 #include <cpsettingformentryitemdataimpl.h>
       
    24 #include <cpitemdatahelper.h>
       
    25 #include <cpbasesettingview.h>
       
    26 #include <QtTest/QtTest>
       
    27 #include <hbdataform.h>
       
    28 #include <hbpushbutton.h>
       
    29 #include <hbicon.h>
       
    30 
       
    31 /*!
       
    32     \class TestCpSettingFormEntryItemData
       
    33     \brief This class is used for the unit test for class CpSettingFormEntryItemData.\n
       
    34       CpSettingFormEntryItemData class is used for access to a control panel setting form entry item data, \n
       
    35       this class has a pure virtual member function, so it is not allowed to create instance directly, instead of that, \n
       
    36       developer should a template class CpSettingFormEntryItemDataImpl to create new instance of CpSettingFormEntryItemData.\n
       
    37       This unit test is supported by QTest.\n
       
    38       There are total 18 test cases in this unit.\n 
       
    39  */
       
    40 
       
    41 void TestCpSettingFormEntryItemData::initTestCase()
       
    42     {
       
    43 
       
    44     }
       
    45 
       
    46 void TestCpSettingFormEntryItemData::cleanupTestCase()
       
    47     {
       
    48     QCoreApplication::processEvents();
       
    49     }
       
    50 
       
    51 /*!
       
    52  * Test Case Description:\n &nbsp;
       
    53  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
    54          CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
       
    55             const QString &text = QString(),
       
    56             const QString &description = QString(),
       
    57             const HbIcon &icon = HbIcon(),
       
    58             const HbDataFormModelItem *parent = 0) : 
       
    59             CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n&nbsp;
       
    60    2. Function Descrition: \n &nbsp;&nbsp;
       
    61         \n&nbsp;
       
    62    3. Input Parameters: \n&nbsp;&nbsp;
       
    63        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
    64        QString &text\n&nbsp;&nbsp;
       
    65        QString &description\n&nbsp;&nbsp;
       
    66        HbIcon &icon\n&nbsp;&nbsp;
       
    67        HbDataFormModelItem *parent\n&nbsp;
       
    68        
       
    69    4. Expected result: \n&nbsp;&nbsp;
       
    70        case run without verify failed.\n 
       
    71  */
       
    72 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperNoForm()
       
    73     {
       
    74     CpItemDataHelper *pHelper1 = new CpItemDataHelper();
       
    75     QVERIFY( pHelper1 != 0 );
       
    76     
       
    77     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper1, "text", "description"  );
       
    78     QVERIFY( pdataimp1 !=0 );
       
    79     QString strtxt1 = "input texts";
       
    80     pdataimp1->setText(strtxt1);
       
    81     QVERIFY( pdataimp1->text() == strtxt1 );
       
    82     
       
    83     QString strDes1 = "input descriptions";
       
    84     pdataimp1->setDescription(strDes1);
       
    85     QVERIFY( pdataimp1->description() == strDes1);
       
    86     
       
    87     QString strIconName1 = "input iconname";
       
    88     pdataimp1->setIconName(strIconName1);
       
    89     QVERIFY( pdataimp1->iconName() == strIconName1);
       
    90     
       
    91     HbIcon itemIcon1(QString(""));
       
    92     pdataimp1->setEntryItemIcon(itemIcon1);
       
    93     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
    94     
       
    95     delete pdataimp1;
       
    96     delete pHelper1;
       
    97     }
       
    98 
       
    99 /*!
       
   100  * Test Case Description:\n &nbsp;
       
   101  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   102          CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
       
   103             const QString &text = QString(),
       
   104             const QString &description = QString(),
       
   105             const HbIcon &icon = HbIcon(),
       
   106             const HbDataFormModelItem *parent = 0) : 
       
   107             CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   108    2. Function Descrition: \n &nbsp;&nbsp;
       
   109         \n&nbsp;
       
   110    3. Input Parameters: \n&nbsp;&nbsp;
       
   111        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   112        QString &text\n&nbsp;&nbsp;
       
   113        QString &description\n&nbsp;&nbsp;
       
   114        HbIcon &icon\n&nbsp;&nbsp;
       
   115        HbDataFormModelItem *parent\n&nbsp;
       
   116    4. Expected result: \n&nbsp;&nbsp;
       
   117        case run without verify failed.\n 
       
   118  */
       
   119 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperAndForm()
       
   120     {
       
   121     HbDataForm *pForm2 = new HbDataForm(0);
       
   122     QVERIFY(pForm2 != 0);
       
   123     
       
   124     CpItemDataHelper *pHelper2 = new CpItemDataHelper(pForm2);
       
   125     QVERIFY( pHelper2 != 0 );
       
   126     
       
   127     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp2 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper2, "text", "description"  );
       
   128     QVERIFY( pdataimp2 !=0 );
       
   129     QString strtxt2 = "input texts";
       
   130     pdataimp2->setText(strtxt2);
       
   131     QVERIFY( pdataimp2->text() == strtxt2 );
       
   132     
       
   133     QString strDes2 = "input descriptions";
       
   134     pdataimp2->setDescription(strDes2);
       
   135     QVERIFY( pdataimp2->description() == strDes2);
       
   136     
       
   137     delete pdataimp2;
       
   138     delete pHelper2;
       
   139     delete pForm2;
       
   140     }
       
   141 
       
   142 /*!
       
   143  * Test Case Description:\n &nbsp;
       
   144  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   145          CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
       
   146             const QString &text = QString(),
       
   147             const QString &description = QString(),
       
   148             const HbIcon &icon = HbIcon(),
       
   149             const HbDataFormModelItem *parent = 0) : 
       
   150             CpSettingFormEntryItemData(dataForm,text,description,icon,parent);\n&nbsp;
       
   151    2. Function Descrition: \n &nbsp;&nbsp;
       
   152         \n&nbsp;
       
   153    3. Input Parameters: \n&nbsp;&nbsp;
       
   154        HbDataForm *dataForm\n&nbsp;&nbsp;
       
   155        QString &text\n&nbsp;&nbsp;
       
   156        QString &description\n&nbsp;&nbsp;
       
   157        HbIcon &icon\n&nbsp;&nbsp;
       
   158        HbDataFormModelItem *parent\n&nbsp;
       
   159    4. Expected result: \n&nbsp;&nbsp;
       
   160        case run without verify failed.\n 
       
   161  */
       
   162 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithForm()
       
   163     {
       
   164     HbDataForm * pForm1 = new HbDataForm();
       
   165     QVERIFY(pForm1 != 0);
       
   166     
       
   167     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( pForm1, "text", "description" );
       
   168     QVERIFY( pdataimp1 !=0 );
       
   169     QString strtxt1 = "input texts";
       
   170     pdataimp1->setText(strtxt1);
       
   171     QVERIFY( pdataimp1->text() == strtxt1 );
       
   172     
       
   173     QString strDes1 = "input descriptions";
       
   174     pdataimp1->setDescription(strDes1);
       
   175     QVERIFY( pdataimp1->description() == strDes1);
       
   176     
       
   177     QString strIconName1 = "input iconname";
       
   178     pdataimp1->setIconName(strIconName1);
       
   179     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   180     
       
   181     HbIcon itemIcon1(QString(""));
       
   182     pdataimp1->setEntryItemIcon(itemIcon1);
       
   183     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   184     
       
   185     delete pdataimp1;
       
   186     delete pForm1;
       
   187     }
       
   188 
       
   189 /*!
       
   190  * Test Case Description:\n &nbsp;
       
   191  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   192          CpSettingFormEntryItemDataImpl(
       
   193             EntryItemType type,
       
   194             CpItemDataHelper &itemDataHelper,
       
   195             const QString &text = QString(),
       
   196             const QString &description = QString(),
       
   197             const QString &icon = QString(),
       
   198             const HbDataFormModelItem *parent = 0) : 
       
   199             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   200             
       
   201    2. Function Descrition: \n &nbsp;&nbsp;
       
   202         \n&nbsp;
       
   203    3. Input Parameters: \n&nbsp;&nbsp;
       
   204        EntryItemType type\n&nbsp;&nbsp;
       
   205        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   206        QString &text\n&nbsp;&nbsp;
       
   207        QString &description\n&nbsp;&nbsp;
       
   208        HbIcon &icon\n&nbsp;&nbsp;
       
   209        HbDataFormModelItem *parent\n&nbsp;
       
   210    4. Expected result: \n&nbsp;&nbsp;
       
   211        case run without verify failed.\n 
       
   212  */
       
   213 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndForm()
       
   214     {
       
   215     HbDataForm * pForm1 = new HbDataForm();
       
   216     QVERIFY(pForm1 != 0);
       
   217     
       
   218     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, pForm1, "text", "description" );
       
   219     QVERIFY( pdataimp1 !=0 );
       
   220     QString strtxt1 = "input texts";
       
   221     pdataimp1->setText(strtxt1);
       
   222     QVERIFY( pdataimp1->text() == strtxt1 );
       
   223     
       
   224     QString strDes1 = "input descriptions";
       
   225     pdataimp1->setDescription(strDes1);
       
   226     QVERIFY( pdataimp1->description() == strDes1);
       
   227     
       
   228     QString strIconName1 = "input iconname";
       
   229     pdataimp1->setIconName(strIconName1);
       
   230     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   231     
       
   232     HbIcon itemIcon1(QString(""));
       
   233     pdataimp1->setEntryItemIcon(itemIcon1);
       
   234     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   235     
       
   236     delete pdataimp1;
       
   237     delete pForm1;
       
   238     }
       
   239 
       
   240 /*!
       
   241  * Test Case Description:\n &nbsp;
       
   242  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   243          CpSettingFormEntryItemDataImpl(
       
   244             EntryItemType type,
       
   245             HbDataForm *dataForm,
       
   246             const QString &text = QString(),
       
   247             const QString &description = QString(),
       
   248             const QString &icon = QString(),
       
   249             const HbDataFormModelItem *parent = 0) : 
       
   250             CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n&nbsp;
       
   251             
       
   252    2. Function Descrition: \n &nbsp;&nbsp;
       
   253         \n&nbsp;
       
   254    3. Input Parameters: \n&nbsp;&nbsp;
       
   255        EntryItemType type\n&nbsp;&nbsp;
       
   256        HbDataForm *dataForm\n&nbsp;&nbsp;
       
   257        QString &text\n&nbsp;&nbsp;
       
   258        QString &description\n&nbsp;&nbsp;
       
   259        HbIcon &icon\n&nbsp;&nbsp;
       
   260        HbDataFormModelItem *parent\n&nbsp;
       
   261    4. Expected result: \n&nbsp;&nbsp;
       
   262        case run without verify failed.\n 
       
   263  */
       
   264 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndForm()
       
   265     {
       
   266     HbDataForm * pForm1 = new HbDataForm();
       
   267     QVERIFY(pForm1 != 0);
       
   268     
       
   269     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, pForm1, "text", "description" );
       
   270     QVERIFY( pdataimp1 !=0 );
       
   271     QString strtxt1 = "input texts";
       
   272     pdataimp1->setText(strtxt1);
       
   273     QVERIFY( pdataimp1->text() == strtxt1 );
       
   274     
       
   275     QString strDes1 = "input descriptions";
       
   276     pdataimp1->setDescription(strDes1);
       
   277     QVERIFY( pdataimp1->description() == strDes1);
       
   278     
       
   279     QString strIconName1 = "input iconname";
       
   280     pdataimp1->setIconName(strIconName1);
       
   281     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   282     
       
   283     HbIcon itemIcon1(QString(""));
       
   284     pdataimp1->setEntryItemIcon(itemIcon1);
       
   285     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   286     
       
   287     delete pdataimp1;
       
   288     delete pForm1;
       
   289     }
       
   290 
       
   291 /*!
       
   292  * Test Case Description:\n &nbsp;
       
   293  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   294          CpSettingFormEntryItemDataImpl(
       
   295             EntryItemType type,
       
   296             HbDataForm *dataForm,
       
   297             const QString &text = QString(),
       
   298             const QString &description = QString(),
       
   299             const QString &icon = QString(),
       
   300             const HbDataFormModelItem *parent = 0) : 
       
   301             CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n&nbsp;
       
   302             
       
   303    2. Function Descrition: \n &nbsp;&nbsp;
       
   304         \n&nbsp;
       
   305    3. Input Parameters: \n&nbsp;&nbsp;
       
   306        EntryItemType type\n&nbsp;&nbsp;
       
   307        HbDataForm *dataForm\n&nbsp;&nbsp;
       
   308        QString &text\n&nbsp;&nbsp;
       
   309        QString &description\n&nbsp;&nbsp;
       
   310        HbIcon &icon\n&nbsp;&nbsp;
       
   311        HbDataFormModelItem *parent\n&nbsp;
       
   312    4. Expected result: \n&nbsp;&nbsp;
       
   313        case run without verify failed.\n 
       
   314  */
       
   315 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemData005()
       
   316     {
       
   317     HbDataForm * pForm1 = new HbDataForm();
       
   318     QVERIFY(pForm1 != 0);
       
   319     
       
   320     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, pForm1, "text", "description" );
       
   321     QVERIFY( pdataimp1 !=0 );
       
   322     QString strtxt1 = "input texts";
       
   323     pdataimp1->setText(strtxt1);
       
   324     QVERIFY( pdataimp1->text() == strtxt1 );
       
   325     
       
   326     QString strDes1 = "input descriptions";
       
   327     pdataimp1->setDescription(strDes1);
       
   328     QVERIFY( pdataimp1->description() == strDes1);
       
   329 
       
   330     QString strIconName1 = "input iconname";
       
   331     pdataimp1->setIconName(strIconName1);
       
   332     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   333     
       
   334     HbIcon itemIcon1(QString(""));
       
   335     pdataimp1->setEntryItemIcon(itemIcon1);
       
   336     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   337     
       
   338     delete pdataimp1;
       
   339     delete pForm1;
       
   340     }
       
   341 
       
   342 /*!
       
   343  * Test Case Description:\n &nbsp;
       
   344  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   345          CpSettingFormEntryItemDataImpl(
       
   346             EntryItemType type,
       
   347             HbDataForm *dataForm,
       
   348             const QString &text = QString(),
       
   349             const QString &description = QString(),
       
   350             const QString &icon = QString(),
       
   351             const HbDataFormModelItem *parent = 0) : 
       
   352             CpSettingFormEntryItemData(type,dataForm,text,description,icon,parent);\n&nbsp;
       
   353             
       
   354    2. Function Descrition: \n &nbsp;&nbsp;
       
   355         \n&nbsp;
       
   356    3. Input Parameters: \n&nbsp;&nbsp;
       
   357        EntryItemType type\n&nbsp;&nbsp;
       
   358        HbDataForm *dataForm\n&nbsp;&nbsp;
       
   359        QString &text\n&nbsp;&nbsp;
       
   360        QString &description\n&nbsp;&nbsp;
       
   361        HbIcon &icon\n&nbsp;&nbsp;
       
   362        HbDataFormModelItem *parent\n&nbsp;
       
   363        
       
   364    4. Expected result: \n&nbsp;&nbsp;
       
   365        case run without verify failed.\n 
       
   366  */
       
   367 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemData005a()
       
   368     {
       
   369     HbDataForm * pForm1 = new HbDataForm();
       
   370     QVERIFY(pForm1 != 0);
       
   371     
       
   372     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, pForm1, "text", "description" );
       
   373     QVERIFY( pdataimp1 !=0 );
       
   374     QString strtxt1 = "input texts";
       
   375     pdataimp1->setText(strtxt1);
       
   376     QVERIFY( pdataimp1->text() == strtxt1 );
       
   377     
       
   378     QString strDes1 = "input descriptions";
       
   379     pdataimp1->setDescription(strDes1);
       
   380     QVERIFY( pdataimp1->description() == strDes1);
       
   381 
       
   382     QString strIconName1 = "input iconname";
       
   383     pdataimp1->setIconName(strIconName1);
       
   384     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   385     
       
   386     HbIcon itemIcon1(QString(""));
       
   387     pdataimp1->setEntryItemIcon(itemIcon1);
       
   388     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   389     
       
   390     delete pdataimp1;
       
   391     delete pForm1;
       
   392     }
       
   393 
       
   394 /*!
       
   395  * Test Case Description:\n &nbsp;
       
   396  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   397          CpSettingFormEntryItemDataImpl(
       
   398             EntryItemType type,
       
   399             CpItemDataHelper &itemDataHelper,
       
   400             const QString &text = QString(),
       
   401             const QString &description = QString(),
       
   402             const QString &icon = QString(),
       
   403             const HbDataFormModelItem *parent = 0) : 
       
   404             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   405             
       
   406    2. Function Descrition: \n &nbsp;&nbsp;
       
   407         \n&nbsp;
       
   408    3. Input Parameters: \n&nbsp;&nbsp;
       
   409        EntryItemType type\n&nbsp;&nbsp;
       
   410        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   411        QString &text\n&nbsp;&nbsp;
       
   412        QString &description\n&nbsp;&nbsp;
       
   413        HbIcon &icon\n&nbsp;&nbsp;
       
   414        HbDataFormModelItem *parent\n&nbsp;
       
   415        
       
   416    4. Expected result: \n&nbsp;&nbsp;
       
   417        case run without verify failed.\n 
       
   418  */
       
   419 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndHelper()
       
   420     {
       
   421     CpItemDataHelper *pHelper1 = new CpItemDataHelper();
       
   422     QVERIFY(pHelper1 != 0);
       
   423     
       
   424     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, *pHelper1, "text", "description" );
       
   425     QVERIFY( pdataimp1 !=0 );
       
   426     QString strtxt1 = "input texts";
       
   427     pdataimp1->setText(strtxt1);
       
   428     QVERIFY( pdataimp1->text() == strtxt1 );
       
   429     
       
   430     QString strDes1 = "input descriptions";
       
   431     pdataimp1->setDescription(strDes1);
       
   432     QVERIFY( pdataimp1->description() == strDes1);
       
   433     
       
   434     QString strIconName1 = "input iconname";
       
   435     pdataimp1->setIconName(strIconName1);
       
   436     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   437     
       
   438     HbIcon itemIcon1(QString(""));
       
   439     pdataimp1->setEntryItemIcon(itemIcon1);
       
   440     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   441     
       
   442     delete pdataimp1;
       
   443     delete pHelper1;
       
   444     }
       
   445 
       
   446 /*!
       
   447  * Test Case Description:\n &nbsp;
       
   448  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   449          CpSettingFormEntryItemDataImpl(
       
   450             EntryItemType type,
       
   451             CpItemDataHelper &itemDataHelper,
       
   452             const QString &text = QString(),
       
   453             const QString &description = QString(),
       
   454             const QString &icon = QString(),
       
   455             const HbDataFormModelItem *parent = 0) : 
       
   456             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   457             
       
   458    2. Function Descrition: \n &nbsp;&nbsp;
       
   459         \n&nbsp;
       
   460    3. Input Parameters: \n&nbsp;&nbsp;
       
   461        EntryItemType type\n&nbsp;&nbsp;
       
   462        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   463        QString &text\n&nbsp;&nbsp;
       
   464        QString &description\n&nbsp;&nbsp;
       
   465        HbIcon &icon\n&nbsp;&nbsp;
       
   466        HbDataFormModelItem *parent\n&nbsp;
       
   467        
       
   468    4. Expected result: \n&nbsp;&nbsp;
       
   469        case run without verify failed.\n 
       
   470  */
       
   471 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndHelper()
       
   472     {
       
   473     CpItemDataHelper *pHelper1 = new CpItemDataHelper();
       
   474     QVERIFY(pHelper1 != 0);
       
   475     
       
   476     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, *pHelper1, "text", "description" );
       
   477     QVERIFY( pdataimp1 !=0 );
       
   478     QString strtxt1 = "input texts";
       
   479     pdataimp1->setText(strtxt1);
       
   480     QVERIFY( pdataimp1->text() == strtxt1 );
       
   481     
       
   482     QString strDes1 = "input descriptions";
       
   483     pdataimp1->setDescription(strDes1);
       
   484     QVERIFY( pdataimp1->description() == strDes1);
       
   485     
       
   486     QString strIconName1 = "input iconname";
       
   487     pdataimp1->setIconName(strIconName1);
       
   488     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   489     
       
   490     HbIcon itemIcon1(QString(""));
       
   491     pdataimp1->setEntryItemIcon(itemIcon1);
       
   492     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   493     
       
   494     delete pdataimp1;
       
   495     delete pHelper1;
       
   496     }
       
   497 
       
   498 /*!
       
   499  * Test Case Description:\n &nbsp;
       
   500  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   501          CpSettingFormEntryItemDataImpl(
       
   502             EntryItemType type,
       
   503             CpItemDataHelper &itemDataHelper,
       
   504             const QString &text = QString(),
       
   505             const QString &description = QString(),
       
   506             const QString &icon = QString(),
       
   507             const HbDataFormModelItem *parent = 0) : 
       
   508             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   509             
       
   510    2. Function Descrition: \n &nbsp;&nbsp;
       
   511         \n&nbsp;
       
   512    3. Input Parameters: \n&nbsp;&nbsp;
       
   513        EntryItemType type\n&nbsp;&nbsp;
       
   514        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   515        QString &text\n&nbsp;&nbsp;
       
   516        QString &description\n&nbsp;&nbsp;
       
   517        HbIcon &icon\n&nbsp;&nbsp;
       
   518        HbDataFormModelItem *parent\n&nbsp;
       
   519        
       
   520    4. Expected result: \n&nbsp;&nbsp;
       
   521        case run without verify failed.\n 
       
   522  */
       
   523 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeAndHelperForm()
       
   524     {
       
   525     HbDataForm * pForm1 = new HbDataForm();
       
   526     QVERIFY(pForm1 != 0);
       
   527     
       
   528     CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
       
   529     QVERIFY(pHelper1 != 0);
       
   530     
       
   531     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, *pHelper1, "text", "description" );
       
   532     QVERIFY( pdataimp1 !=0 );
       
   533     QString strtxt1 = "input texts";
       
   534     pdataimp1->setText(strtxt1);
       
   535     QVERIFY( pdataimp1->text() == strtxt1 );
       
   536     
       
   537     QString strDes1 = "input descriptions";
       
   538     pdataimp1->setDescription(strDes1);
       
   539     QVERIFY( pdataimp1->description() == strDes1);
       
   540     
       
   541     QString strIconName1 = "input iconname";
       
   542     pdataimp1->setIconName(strIconName1);
       
   543     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   544     
       
   545     HbIcon itemIcon1(QString(""));
       
   546     pdataimp1->setEntryItemIcon(itemIcon1);
       
   547     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   548     
       
   549     delete pdataimp1;
       
   550     delete pHelper1;
       
   551     delete pForm1;
       
   552     }
       
   553 
       
   554 /*!
       
   555  * Test Case Description:\n &nbsp;
       
   556  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   557          CpSettingFormEntryItemDataImpl(
       
   558             EntryItemType type,
       
   559             CpItemDataHelper &itemDataHelper,
       
   560             const QString &text = QString(),
       
   561             const QString &description = QString(),
       
   562             const QString &icon = QString(),
       
   563             const HbDataFormModelItem *parent = 0) : 
       
   564             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   565             
       
   566    2. Function Descrition: \n &nbsp;&nbsp;
       
   567         \n&nbsp;
       
   568    3. Input Parameters: \n&nbsp;&nbsp;
       
   569        EntryItemType type\n&nbsp;&nbsp;
       
   570        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   571        QString &text\n&nbsp;&nbsp;
       
   572        QString &description\n&nbsp;&nbsp;
       
   573        HbIcon &icon\n&nbsp;&nbsp;
       
   574        HbDataFormModelItem *parent\n&nbsp;
       
   575        
       
   576    4. Expected result: \n&nbsp;&nbsp;
       
   577        case run without verify failed.\n 
       
   578  */
       
   579 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeAndHelperForm()
       
   580     {
       
   581     HbDataForm * pForm1 = new HbDataForm();
       
   582     QVERIFY(pForm1 != 0);
       
   583     
       
   584     CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
       
   585     QVERIFY(pHelper1 != 0);
       
   586     
       
   587     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, *pHelper1, "text", "description" );
       
   588     QVERIFY( pdataimp1 !=0 );
       
   589     QString strtxt1 = "input texts";
       
   590     pdataimp1->setText(strtxt1);
       
   591     QVERIFY( pdataimp1->text() == strtxt1 );
       
   592     
       
   593     QString strDes1 = "input descriptions";
       
   594     pdataimp1->setDescription(strDes1);
       
   595     QVERIFY( pdataimp1->description() == strDes1);
       
   596     
       
   597     QString strIconName1 = "input iconname";
       
   598     pdataimp1->setIconName(strIconName1);
       
   599     QVERIFY( pdataimp1->iconName() == strIconName1);
       
   600     
       
   601     HbIcon itemIcon1(QString(""));
       
   602     pdataimp1->setEntryItemIcon(itemIcon1);
       
   603     QVERIFY( pdataimp1->entryItemIcon() == itemIcon1);
       
   604     
       
   605     delete pdataimp1;
       
   606     delete pHelper1;
       
   607     delete pForm1;
       
   608     }
       
   609 
       
   610 /*!
       
   611  * Test Case Description:\n &nbsp;
       
   612  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   613          CpSettingFormEntryItemDataImpl(HbDataForm *dataForm,
       
   614             const QString &text = QString(),
       
   615             const QString &description = QString(),
       
   616             const HbIcon &icon = HbIcon(),
       
   617             const HbDataFormModelItem *parent = 0) : 
       
   618             CpSettingFormEntryItemData(dataForm,text,description,icon,parent);\n&nbsp;
       
   619             
       
   620    2. Function Descrition: \n &nbsp;&nbsp;
       
   621         \n&nbsp;
       
   622    3. Input Parameters: \n&nbsp;&nbsp;
       
   623        HbDataForm *dataForm\n&nbsp;&nbsp;
       
   624        QString &text\n&nbsp;&nbsp;
       
   625        QString &description\n&nbsp;&nbsp;
       
   626        HbIcon &icon\n&nbsp;&nbsp;
       
   627        HbDataFormModelItem *parent\n&nbsp;
       
   628        
       
   629    4. Expected result: \n&nbsp;&nbsp;
       
   630        case run without verify failed.\n 
       
   631  */
       
   632 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithFormParam()
       
   633     {
       
   634     HbDataForm * form = new HbDataForm();
       
   635     QVERIFY(form != 0);
       
   636     
       
   637     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(form);
       
   638     QVERIFY( pdataimp1 !=0 );
       
   639     QString strtxt1 = "input texts";
       
   640     pdataimp1->setText(strtxt1);
       
   641     QVERIFY( pdataimp1->text() == strtxt1 );
       
   642     
       
   643     QString strDes1 = "input descriptions";
       
   644     pdataimp1->setDescription(strDes1);
       
   645     QVERIFY( pdataimp1->description() == strDes1);
       
   646     delete pdataimp1;
       
   647     delete form;
       
   648     }
       
   649 
       
   650 /*!
       
   651  * Test Case Description:\n &nbsp;
       
   652  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   653          CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
       
   654             const QString &text = QString(),
       
   655             const QString &description = QString(),
       
   656             const HbIcon &icon = HbIcon(),
       
   657             const HbDataFormModelItem *parent = 0) : 
       
   658             CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   659             
       
   660    2. Function Descrition: \n &nbsp;&nbsp;
       
   661         \n&nbsp;
       
   662    3. Input Parameters: \n&nbsp;&nbsp;
       
   663        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   664        QString &text\n&nbsp;&nbsp;
       
   665        QString &description\n&nbsp;&nbsp;
       
   666        HbIcon &icon\n&nbsp;&nbsp;
       
   667        HbDataFormModelItem *parent\n&nbsp;
       
   668        
       
   669    4. Expected result: \n&nbsp;&nbsp;
       
   670        case run without verify failed.\n 
       
   671  */
       
   672 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperParam()
       
   673     {
       
   674     CpItemDataHelper *pHelper1 = new CpItemDataHelper();
       
   675     QVERIFY(pHelper1 != 0);
       
   676     
       
   677     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(*pHelper1);
       
   678     QVERIFY( pdataimp1 !=0 );
       
   679     QString strtxt1 = "input texts";
       
   680     pdataimp1->setText(strtxt1);
       
   681     QVERIFY( pdataimp1->text() == strtxt1 );
       
   682     
       
   683     QString strDes1 = "input descriptions";
       
   684     pdataimp1->setDescription(strDes1);
       
   685     QVERIFY( pdataimp1->description() == strDes1);
       
   686     delete pdataimp1;
       
   687     delete pHelper1;
       
   688     }
       
   689 
       
   690 /*!
       
   691  * Test Case Description:\n &nbsp;
       
   692  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   693          CpSettingFormEntryItemDataImpl(CpItemDataHelper &itemDataHelper,
       
   694             const QString &text = QString(),
       
   695             const QString &description = QString(),
       
   696             const HbIcon &icon = HbIcon(),
       
   697             const HbDataFormModelItem *parent = 0) : 
       
   698             CpSettingFormEntryItemData(itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   699             
       
   700    2. Function Descrition: \n &nbsp;&nbsp;
       
   701         \n&nbsp;
       
   702    3. Input Parameters: \n&nbsp;&nbsp;
       
   703        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   704        QString &text\n&nbsp;&nbsp;
       
   705        QString &description\n&nbsp;&nbsp;
       
   706        HbIcon &icon\n&nbsp;&nbsp;
       
   707        HbDataFormModelItem *parent\n&nbsp;
       
   708        
       
   709    4. Expected result: \n&nbsp;&nbsp;
       
   710        case run without verify failed.\n 
       
   711  */
       
   712 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithHelperForm()
       
   713     {
       
   714     HbDataForm * pForm1 = new HbDataForm();
       
   715     QVERIFY(pForm1 != 0);
       
   716     
       
   717     CpItemDataHelper *pHelper1 = new CpItemDataHelper(pForm1);
       
   718     QVERIFY(pHelper1 != 0);
       
   719     
       
   720     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>(*pHelper1);
       
   721     QVERIFY( pdataimp1 !=0 );
       
   722     QString strtxt1 = "input texts";
       
   723     pdataimp1->setText(strtxt1);
       
   724     QVERIFY( pdataimp1->text() == strtxt1 );
       
   725     
       
   726     QString strDes1 = "input descriptions";
       
   727     pdataimp1->setDescription(strDes1);
       
   728     QVERIFY( pdataimp1->description() == strDes1);
       
   729     delete pdataimp1;
       
   730     delete pHelper1;
       
   731     }
       
   732 
       
   733 /*!
       
   734  * Test Case Description:\n &nbsp;
       
   735  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   736          CpSettingFormEntryItemDataImpl(
       
   737             EntryItemType type,
       
   738             CpItemDataHelper &itemDataHelper,
       
   739             const QString &text = QString(),
       
   740             const QString &description = QString(),
       
   741             const QString &icon = QString(),
       
   742             const HbDataFormModelItem *parent = 0) : 
       
   743             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   744             
       
   745    2. Function Descrition: \n &nbsp;&nbsp;
       
   746         \n&nbsp;
       
   747    3. Input Parameters: \n&nbsp;&nbsp;
       
   748        EntryItemType type\n&nbsp;&nbsp;
       
   749        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   750        QString &text\n&nbsp;&nbsp;
       
   751        QString &description\n&nbsp;&nbsp;
       
   752        HbIcon &icon\n&nbsp;&nbsp;
       
   753        HbDataFormModelItem *parent\n&nbsp;
       
   754        
       
   755    4. Expected result: \n&nbsp;&nbsp;
       
   756        case run without verify failed.\n 
       
   757  */
       
   758 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithListTypeNullPointer()
       
   759     {
       
   760     HbDataForm * pForm1 = new HbDataForm();
       
   761     QVERIFY(pForm1 != 0);
       
   762     
       
   763     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ListEntryItem, 0, "text", "description" );
       
   764     QVERIFY( pdataimp1 !=0 );
       
   765     QString strtxt1 = "input texts";
       
   766     pdataimp1->setText(strtxt1);
       
   767     QVERIFY( pdataimp1->text() == strtxt1 );
       
   768     
       
   769     QString strDes1 = "input descriptions";
       
   770     pdataimp1->setDescription(strDes1);
       
   771     QVERIFY( pdataimp1->description() == strDes1);
       
   772     delete pdataimp1;
       
   773     delete pForm1;
       
   774     }
       
   775 
       
   776 /*!
       
   777  * Test Case Description:\n &nbsp;
       
   778  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   779          CpSettingFormEntryItemDataImpl(
       
   780             EntryItemType type,
       
   781             CpItemDataHelper &itemDataHelper,
       
   782             const QString &text = QString(),
       
   783             const QString &description = QString(),
       
   784             const QString &icon = QString(),
       
   785             const HbDataFormModelItem *parent = 0) : 
       
   786             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   787             
       
   788    2. Function Descrition: \n &nbsp;&nbsp;
       
   789         \n&nbsp;
       
   790    3. Input Parameters: \n&nbsp;&nbsp;
       
   791        EntryItemType type\n&nbsp;&nbsp;
       
   792        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   793        QString &text\n&nbsp;&nbsp;
       
   794        QString &description\n&nbsp;&nbsp;
       
   795        HbIcon &icon\n&nbsp;&nbsp;
       
   796        HbDataFormModelItem *parent\n&nbsp;
       
   797        
       
   798    4. Expected result: \n&nbsp;&nbsp;
       
   799        case run without verify failed.\n 
       
   800  */
       
   801 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithButtonTypeNullPointer()
       
   802     {
       
   803     HbDataForm * pForm1 = new HbDataForm();
       
   804     QVERIFY(pForm1 != 0);
       
   805     
       
   806     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, 0, "text", "description" );
       
   807     QVERIFY( pdataimp1 !=0 );
       
   808     QString strtxt1 = "input texts";
       
   809     pdataimp1->setText(strtxt1);
       
   810     QVERIFY( pdataimp1->text() == strtxt1 );
       
   811     
       
   812     QString strDes1 = "input descriptions";
       
   813     pdataimp1->setDescription(strDes1);
       
   814     QVERIFY( pdataimp1->description() == strDes1);
       
   815     delete pdataimp1;
       
   816     delete pForm1;
       
   817     }
       
   818 
       
   819 /*!
       
   820  * Test Case Description:\n &nbsp;
       
   821  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   822          CpSettingFormEntryItemDataImpl(
       
   823             EntryItemType type,
       
   824             CpItemDataHelper &itemDataHelper,
       
   825             const QString &text = QString(),
       
   826             const QString &description = QString(),
       
   827             const QString &icon = QString(),
       
   828             const HbDataFormModelItem *parent = 0) : 
       
   829             CpSettingFormEntryItemData(type,itemDataHelper,text,description,icon,parent);\n&nbsp;
       
   830             
       
   831    2. Function Descrition: \n &nbsp;&nbsp;
       
   832         \n&nbsp;
       
   833    3. Input Parameters: \n&nbsp;&nbsp;
       
   834        EntryItemType type\n&nbsp;&nbsp;
       
   835        CpItemDataHelper &itemDataHelper\n&nbsp;&nbsp;
       
   836        QString &text\n&nbsp;&nbsp;
       
   837        QString &description\n&nbsp;&nbsp;
       
   838        HbIcon &icon\n&nbsp;&nbsp;
       
   839        HbDataFormModelItem *parent\n&nbsp;
       
   840        
       
   841    4. Expected result: \n&nbsp;&nbsp;
       
   842        case run without verify failed.\n 
       
   843  */
       
   844 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithInvalidTypeNullPointer()
       
   845     {
       
   846     HbDataForm * pForm1 = new HbDataForm();
       
   847     QVERIFY(pForm1 != 0);
       
   848     
       
   849     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp1 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( CpSettingFormEntryItemData::ButtonEntryItem, 0, "text", "description" );
       
   850     QVERIFY( pdataimp1 !=0 );
       
   851     QString strtxt1 = "input texts";
       
   852     pdataimp1->setText(strtxt1);
       
   853     QVERIFY( pdataimp1->text() == strtxt1 );
       
   854     
       
   855     QString strDes1 = "input descriptions";
       
   856     pdataimp1->setDescription(strDes1);
       
   857     QVERIFY( pdataimp1->description() == strDes1);
       
   858     delete pdataimp1;
       
   859     delete pForm1;
       
   860     }
       
   861 
       
   862 /*!
       
   863  * Test Case Description:\n &nbsp;
       
   864  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   865          CpSettingFormEntryItemData(const HbDataFormModelItem *parent);\n&nbsp;
       
   866             
       
   867    2. Function Descrition: \n &nbsp;&nbsp;
       
   868         \n&nbsp;
       
   869    3. Input Parameters: \n&nbsp;&nbsp;
       
   870        HbDataFormModelItem *parent\n&nbsp;
       
   871        
       
   872    4. Expected result: \n&nbsp;&nbsp;
       
   873        case run without verify failed.\n 
       
   874  */
       
   875 void TestCpSettingFormEntryItemData::testCpSettingFormEntryItemDataWithParentParam()
       
   876     {
       
   877     MyCpSettingFormEntryItemData * item = new MyCpSettingFormEntryItemData(0);
       
   878     QVERIFY(item != 0);
       
   879     
       
   880     delete item;
       
   881     }
       
   882 
       
   883 /*!
       
   884  * Test Case Description:\n &nbsp;
       
   885  * 1. Fucntion Name: \n&nbsp;&nbsp;
       
   886          onLaunchView();\n&nbsp;
       
   887             
       
   888    2. Function Descrition: \n &nbsp;&nbsp;
       
   889         \n&nbsp;
       
   890    3. Input Parameters: \n&nbsp;&nbsp;
       
   891        QString &text\n&nbsp;&nbsp;
       
   892        QString &description\n&nbsp;&nbsp;
       
   893        HbIcon &icon\n&nbsp;&nbsp;
       
   894        HbDataFormModelItem *parent\n&nbsp;
       
   895        
       
   896    4. Expected result: \n&nbsp;&nbsp;
       
   897        case run without verify failed.\n 
       
   898  */
       
   899 void TestCpSettingFormEntryItemData::testOnLaunchViewNoParam()
       
   900     {
       
   901     HbDataForm *pForm2 = new HbDataForm(0);
       
   902     QVERIFY(pForm2 != 0);
       
   903     
       
   904     CpItemDataHelper *pHelper2 = new CpItemDataHelper(pForm2);
       
   905     QVERIFY( pHelper2 != 0 );
       
   906     
       
   907     CpSettingFormEntryItemDataImpl<CpBaseSettingView> *pdataimp2 = new CpSettingFormEntryItemDataImpl<CpBaseSettingView>( *pHelper2, "text", "description"  );
       
   908     QVERIFY( pdataimp2 !=0 );
       
   909     
       
   910     pdataimp2->onLaunchView();
       
   911     pdataimp2->onLaunchView();
       
   912     
       
   913     QString strtxt2 = "input texts";
       
   914     pdataimp2->setText(strtxt2);
       
   915     QVERIFY( pdataimp2->text() == strtxt2 );
       
   916     
       
   917     QString strDes2 = "input descriptions";
       
   918     pdataimp2->setDescription(strDes2);
       
   919     QVERIFY( pdataimp2->description() == strDes2);
       
   920     
       
   921     delete pdataimp2;
       
   922     delete pHelper2;
       
   923     delete pForm2;
       
   924     }
       
   925 
       
   926 QTEST_MAIN(TestCpSettingFormEntryItemData)