2
Copyright (c) 2011-2013 Sérgio Martins <iamsergio@gmail.com>
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.
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.
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
20
#ifndef ETMCALENDAR_TEST_H_
21
#define ETMCALENDAR_TEST_H_
23
#include <kcalcore/calendar.h>
24
#include <akonadi/collection.h>
31
class ETMCalendarTest : public QObject, KCalCore::Calendar::CalendarObserver
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();
49
void testNotifyObserverBug();
51
void testItem(); // tests item()
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 &);
60
void deleteIncidence(const QString &uid);
61
void createIncidence(const QString &uid);
62
void createTodo(const QString &uid, const QString &parentUid);
63
void fetchCollection();
67
Akonadi::ETMCalendar *mCalendar;
68
Akonadi::Collection mCollection;
70
int mIncidencesToDelete;
71
int mIncidencesToChange;
72
QString mLastDeletedUid;
73
QString mLastChangedUid;