2
Copyright (c) 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
21
#ifndef UNITTEST_BASE_H
22
#define UNITTEST_BASE_H
24
#include <kcalcore/calendar.h>
25
#include <akonadi/collection.h>
26
#include <akonadi/item.h>
32
class IncidenceChanger;
35
class UnitTestBase : public QObject {
39
void waitForIt(); // Waits 10 seconds for signals
41
void createIncidence(const QString &uid);
42
void createIncidence(const Akonadi::Item &item);
44
void verifyExists(const QString &uid, bool exists);
45
Akonadi::Item::List calendarItems();
48
void onLoadFinished(bool success, const QString &errorMessage);
52
void compareCalendars(const KCalCore::Calendar::Ptr &expectedCalendar);
53
static QByteArray readFile(const QString &filename);
54
static Akonadi::Item generateIncidence(const QString &uid, const QString &organizer = QString());
56
Akonadi::Collection mCollection;
57
Akonadi::IncidenceChanger *mChanger;