~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/calendar/tests/calendarbasetest.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2010-2011 Sérgio Martins <iamsergio@gmail.com>
 
3
 
 
4
    This library is free software; you can redistribute it and/or modify it
 
5
    under the terms of the GNU Library General Public License as published by
 
6
    the Free Software Foundation; either version 2 of the License, or (at your
 
7
    option) any later version.
 
8
 
 
9
    This library is distributed in the hope that it will be useful, but WITHOUT
 
10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
 
12
    License for more details.
 
13
 
 
14
    You should have received a copy of the GNU Library General Public License
 
15
    along with this library; see the file COPYING.LIB.  If not, write to the
 
16
    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
17
    02110-1301, USA.
 
18
*/
 
19
 
 
20
#ifndef CALENDARBASE_TEST_H_
 
21
#define CALENDARBASE_TEST_H_
 
22
 
 
23
#include <akonadi/collection.h>
 
24
#include <akonadi/item.h>
 
25
 
 
26
 
 
27
#include <QTestEventLoop>
 
28
#include <QtCore/QObject>
 
29
#include <QStringList>
 
30
 
 
31
namespace Akonadi {
 
32
    class CalendarBase;
 
33
}
 
34
 
 
35
class CalendarBaseTest : public QObject
 
36
{
 
37
  Q_OBJECT
 
38
public Q_SLOTS:
 
39
    void handleCreateFinished(bool success, const QString &errorString);
 
40
    void handleDeleteFinished(bool success, const QString &errorString);
 
41
 
 
42
private Q_SLOTS:
 
43
    void initTestCase();
 
44
    void cleanupTestCase();
 
45
 
 
46
    void testItem();
 
47
    void testChildIncidences_data();
 
48
    void testChildIncidences();
 
49
    void testDelete();
 
50
    // void testDeleteAll(); This has been disabled in KCalCore::Calendar::deleteAll*() so no need to test
 
51
 
 
52
private:
 
53
    void fetchCollection();
 
54
    void createInitialIncidences();
 
55
    Akonadi::Item::Id createTodo(const QString &uid, const QString &parentUid = QString());
 
56
 
 
57
    Akonadi::Collection mCollection;
 
58
    Akonadi::CalendarBase *mCalendar;
 
59
    bool mExpectedSlotResult;
 
60
    QStringList mUids;
 
61
    QString mOneEventUid;
 
62
    QString mOneTodoUid;
 
63
    QString mOneJournalUid;
 
64
    QString mOneIncidenceUid;
 
65
 
 
66
};
 
67
 
 
68
#endif