68
|
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();
|
74
|
64 |
void test_privateDataCount();
|
|
65 |
void test_dataFunc();
|
68
|
66 |
|
74
|
67 |
void test_refreshDataModel();
|
|
68 |
void test_fillMruMatchList();
|
|
69 |
void test_obeyContactOrder();
|
68
|
70 |
|
|
71 |
void test_queryDatabases();
|
|
72 |
|
|
73 |
void test_queryCompleted();
|
74
|
74 |
void test_handleQueryCompleted(int err);
|
68
|
75 |
|
|
76 |
private:
|
|
77 |
|
|
78 |
/**
|
|
79 |
* object under test
|
|
80 |
*/
|
|
81 |
NmContactHistoryModelPrivate *mTestObject;
|
|
82 |
|
|
83 |
QStringList mTestNames;
|
|
84 |
bool mSignalEmitted;
|
|
85 |
};
|
|
86 |
|
|
87 |
#endif //__UNITTEST_NMCONTACTHISTORYMODELPRIVATE_H__
|
|
88 |
|