1
/* This file is part of Zanshin Todo.
3
Copyright 2008 Kevin Ottens <ervin@kde.org>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License or (at your option) version 3 or any later version
9
accepted by the membership of KDE e.V. (or its successor approved
10
by the membership of KDE e.V.), which shall act as a proxy
11
defined in Section 14 of version 3 of the license.
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24
#include "modeltestbase.h"
26
#include <akonadi/collectionfetchjob.h>
27
#include <akonadi/qtest_akonadi.h>
30
#include <KTemporaryFile>
32
#include <QtDBus/QDBusInterface>
34
ModelTestBase::ModelTestBase()
39
void ModelTestBase::flushNotifications()
41
QDBusInterface notifications("org.freedesktop.Akonadi",
42
"/notifications/debug",
43
"org.freedesktop.Akonadi.NotificationManager");
44
notifications.call("emitPendingNotifications");
48
void ModelTestBase::initTestCase()
50
qRegisterMetaType<QModelIndex>();
52
Akonadi::CollectionFetchJob *colJob = new Akonadi::CollectionFetchJob(Akonadi::Collection::root());
53
colJob->setResource("akonadi_ical_resource_0");
54
QVERIFY2(colJob->exec(), colJob->errorString().toLatin1().data());
55
QCOMPARE(colJob->collections().size(), 1);
56
m_collection = colJob->collections()[0];
59
#include "modeltestbase.moc"