phonebookui/phonebookservices/tsrc/ut_cntservices/ut_cntservices.h
changeset 81 640d30f4fb64
equal deleted inserted replaced
77:c18f9fa7f42e 81:640d30f4fb64
       
     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 #include <QObject>
       
    20 #include <qmobilityglobal.h>
       
    21 #include <qtcontacts.h>
       
    22 #include <cntabstractserviceprovider.h>
       
    23 #include <cntviewparams.h>
       
    24 
       
    25 class CntServices;
       
    26 class TestViewManager;
       
    27 class HbMainWindow;
       
    28 class TestEngine;
       
    29 
       
    30 /**
       
    31  * A class for testing CntServices.
       
    32  */
       
    33 class UT_CntServices : public QObject, public CntAbstractServiceProvider
       
    34 {
       
    35     Q_OBJECT
       
    36 
       
    37 private slots:
       
    38     void initTestCase();
       
    39     void cleanupTestCase();
       
    40     
       
    41     void testCreating();
       
    42 
       
    43     void test_setEngine();
       
    44 
       
    45     
       
    46     void test_singleFetch();
       
    47     
       
    48     void test_multiFetch();
       
    49     
       
    50     void test_editCreateNew();
       
    51     
       
    52     void test_editCreateNew2();
       
    53     
       
    54     void test_editCreateNewFromVCard();
       
    55     
       
    56     void test_editUpdateExisting();
       
    57     
       
    58     void test_editUpdateExisting2();
       
    59     
       
    60     void test_editExisting();
       
    61     
       
    62     void test_launchContactCard();
       
    63     
       
    64     void test_launchGroupMemberView();
       
    65     
       
    66     void test_launchTemporaryContactCard();
       
    67 
       
    68     void test_terminateService();
       
    69     
       
    70     void test_removeNotSupportedFields();
       
    71 
       
    72     void removeNotSupportedDetails();
       
    73 
       
    74     void test_fillOnlineAccount();
       
    75 
       
    76     void test_updateLocalId();    
       
    77 
       
    78     void test_CompleteServiceAndCloseApp();
       
    79 
       
    80     void test_overrideReturnValue();
       
    81 
       
    82     void test_allowSubViewsExit();
       
    83 
       
    84     //Pointless now: void test_quitApp();
       
    85     //Pointless now: void test_contactManager();    
       
    86 
       
    87 public slots:
       
    88     void onViewChanged( const CntViewParameters aArgs );
       
    89         
       
    90 private:
       
    91     virtual void CompleteServiceAndCloseApp(const QVariant& retValue);
       
    92     //virtual void overrideReturnValue(const QVariant& retValue) { Q_UNUSED(retValue) };
       
    93     //virtual bool allowSubViewsExit() { return true; };
       
    94 
       
    95     
       
    96 private:
       
    97     CntServices*   mCntServices;
       
    98     TestViewManager* mTestViewManager;
       
    99     TestEngine* mEngine;
       
   100     CntViewParameters mViewParams;
       
   101 };
       
   102 
       
   103 // EOF