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

« back to all changes in this revision

Viewing changes to akonadi/calendar/tests/etmcalendartest.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) 2011-2013 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 ETMCALENDAR_TEST_H_
 
21
#define ETMCALENDAR_TEST_H_
 
22
 
 
23
#include <kcalcore/calendar.h>
 
24
#include <akonadi/collection.h>
 
25
#include <QObject>
 
26
 
 
27
namespace Akonadi {
 
28
    class ETMCalendar;
 
29
}
 
30
 
 
31
class ETMCalendarTest : public QObject, KCalCore::Calendar::CalendarObserver
 
32
{
 
33
    Q_OBJECT
 
34
private Q_SLOTS:
 
35
    void initTestCase();
 
36
    void cleanupTestCase();
 
37
    void testCollectionChanged_data();
 
38
    void testCollectionChanged();
 
39
    void testIncidencesAdded();
 
40
    void testIncidencesModified();
 
41
    void testFilteredModel();
 
42
    void testUnfilteredModel();
 
43
    void testCheckableProxyModel();
 
44
    void testIncidencesDeleted();
 
45
    void testUnselectCollection();
 
46
    void testSelectCollection();
 
47
    void testSubTodos_data();
 
48
    void testSubTodos();
 
49
    void testNotifyObserverBug();
 
50
    void testUidChange();
 
51
    void testItem(); // tests item()
 
52
 
 
53
public Q_SLOTS:
 
54
    void calendarIncidenceAdded(const KCalCore::Incidence::Ptr &incidence);   /**Q_DECL_OVERRIDE*/
 
55
    void calendarIncidenceChanged(const KCalCore::Incidence::Ptr &incidence); /**Q_DECL_OVERRIDE*/
 
56
    void calendarIncidenceDeleted(const KCalCore::Incidence::Ptr &incidence); /**Q_DECL_OVERRIDE*/
 
57
    void handleCollectionsAdded(const Akonadi::Collection::List &);
 
58
 
 
59
private:
 
60
    void deleteIncidence(const QString &uid);
 
61
    void createIncidence(const QString &uid);
 
62
    void createTodo(const QString &uid, const QString &parentUid);
 
63
    void fetchCollection();
 
64
    void waitForIt();
 
65
    void checkExitLoop();
 
66
 
 
67
    Akonadi::ETMCalendar *mCalendar;
 
68
    Akonadi::Collection mCollection;
 
69
    int mIncidencesToAdd;
 
70
    int mIncidencesToDelete;
 
71
    int mIncidencesToChange;
 
72
    QString mLastDeletedUid;
 
73
    QString mLastChangedUid;
 
74
};
 
75
 
 
76
#endif