emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.h
changeset 75 47d84de1c893
child 74 6c59112cfd31
equal deleted inserted replaced
72:64e38f08e49c 75:47d84de1c893
       
     1 /*
       
     2 * Copyright (c) 2010 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 #ifndef __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
       
    19 #define __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 
       
    23 class NmContactHistoryModelPrivate;
       
    24 
       
    25 class TestNmContactHistoryModelPrivate : public QObject
       
    26 {
       
    27     Q_OBJECT
       
    28 
       
    29 signals:
       
    30 
       
    31 private slots:
       
    32     /**
       
    33      * called before anything else when test starts
       
    34      */
       
    35     void initTestCase();
       
    36 
       
    37   /**
       
    38      * will be called before each testfunction is executed.
       
    39      *
       
    40      */
       
    41     void init();
       
    42 
       
    43     /**
       
    44      * will be called after every testfunction.
       
    45      *
       
    46      */
       
    47     void cleanup();
       
    48 
       
    49     /**
       
    50      * will be called after testing ends
       
    51      *
       
    52      */
       
    53     void cleanupTestCase();
       
    54 
       
    55     // Signal
       
    56 
       
    57     void test_queryContactDatabase();
       
    58     void test_queryMruDatabase();
       
    59 
       
    60     void test_populateListWithContactItems();
       
    61     void test_populateListWithMruItems();
       
    62 
       
    63     void test_rowCount();
       
    64     void test_data();
       
    65 
       
    66     void refreshDataModel();
       
    67     void fillMruMatchList();
       
    68     void obeyContactOrder();
       
    69 
       
    70     void test_queryDatabases();
       
    71 
       
    72     void test_queryCompleted();
       
    73     void handleQueryCompleted(int err);
       
    74 
       
    75 private:
       
    76 
       
    77     /**
       
    78      * object under test
       
    79      */
       
    80     NmContactHistoryModelPrivate *mTestObject;
       
    81 
       
    82     QStringList mTestNames;
       
    83     bool        mSignalEmitted;
       
    84 };
       
    85 
       
    86 #endif //__UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
       
    87