emailservices/nmutilities/tsrc/unittests/unittest_nmcontacthistorymodel_p/unittest_nmcontacthistorymodel_p.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 04 Oct 2010 00:05:37 +0300
changeset 75 47d84de1c893
child 74 6c59112cfd31
permissions -rw-r--r--
Revision: 201037 Kit: 201039

/*
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#ifndef __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
#define __UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__

#include <QtTest/QtTest>

class NmContactHistoryModelPrivate;

class TestNmContactHistoryModelPrivate : public QObject
{
    Q_OBJECT

signals:

private slots:
    /**
     * called before anything else when test starts
     */
    void initTestCase();

  /**
     * will be called before each testfunction is executed.
     *
     */
    void init();

    /**
     * will be called after every testfunction.
     *
     */
    void cleanup();

    /**
     * will be called after testing ends
     *
     */
    void cleanupTestCase();

    // Signal

    void test_queryContactDatabase();
    void test_queryMruDatabase();

    void test_populateListWithContactItems();
    void test_populateListWithMruItems();

    void test_rowCount();
    void test_data();

    void refreshDataModel();
    void fillMruMatchList();
    void obeyContactOrder();

    void test_queryDatabases();

    void test_queryCompleted();
    void handleQueryCompleted(int err);

private:

    /**
     * object under test
     */
    NmContactHistoryModelPrivate *mTestObject;

    QStringList mTestNames;
    bool        mSignalEmitted;
};

#endif //__UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__