summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsys.com>2012-10-18 09:59:05 (GMT)
committerChristian Mollekopf <mollekopf@kolabsys.com>2012-10-18 09:59:05 (GMT)
commitdfff5bc603fdcecd247a5a9c136371ef302e6b82 (patch)
treee8cdadc9a0286cd52fc0be9f1f255c737a723ac3
parent17601c16ef211e3de6d9751bef85cccfae38e8fb (diff)
downloadkolab-utils-dfff5bc603fdcecd247a5a9c136371ef302e6b82.tar.gz
Refactoring to make a first FreebusyGenerator test possible.
-rw-r--r--fbdaemon/CMakeLists.txt3
-rw-r--r--fbdaemon/authenticationjob.cpp2
-rw-r--r--fbdaemon/kolabjob.cpp14
-rw-r--r--fbdaemon/settings.cpp61
-rw-r--r--fbdaemon/settings.h17
-rw-r--r--fbdaemon/tests/CMakeLists.txt9
-rw-r--r--fbdaemon/tests/fbgeneratortest.cpp100
-rw-r--r--lib/CMakeLists.txt2
-rw-r--r--lib/jobs/probekolabserverjob.cpp2
-rw-r--r--lib/jobs/setupkolabfoldersjob.cpp4
-rw-r--r--lib/kolabaccount.cpp39
-rw-r--r--lib/kolabaccount.h3
-rw-r--r--lib/testlib/testutils.h21
-rw-r--r--migrationutility/tests/migrationscenariotest.cpp21
-rw-r--r--migrationutility/tests/migrationscenariotest.h25
15 files changed, 222 insertions, 101 deletions
diff --git a/fbdaemon/CMakeLists.txt b/fbdaemon/CMakeLists.txt
index 7f95c9a..a7cc449 100644
--- a/fbdaemon/CMakeLists.txt
+++ b/fbdaemon/CMakeLists.txt
@@ -1,5 +1,4 @@
set (FBDAEMON_SRCS
- ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/authenticationjob.cpp
${CMAKE_CURRENT_SOURCE_DIR}/fbcoordinator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/fbgeneratorjob.cpp
@@ -19,7 +18,7 @@ QT4_WRAP_CPP(FB_MOC
)
set( FBDAEMON_SRCS ${FBDAEMON_SRCS} ${FB_MOC} ${JOBS_SRCS} )
-add_executable(kolab-freebusyd ${FBDAEMON_SRCS} ${JOB_SRCS})
+add_executable(kolab-freebusyd ${FBDAEMON_SRCS} ${JOB_SRCS} main.cpp)
target_link_libraries(kolab-freebusyd ${COMMON_DEPENDENCIES} kolabutils)
install(TARGETS kolab-freebusyd
diff --git a/fbdaemon/authenticationjob.cpp b/fbdaemon/authenticationjob.cpp
index b6fc526..1b9f9ba 100644
--- a/fbdaemon/authenticationjob.cpp
+++ b/fbdaemon/authenticationjob.cpp
@@ -51,7 +51,7 @@ void AuthenticationJob::start()
}
loginJob->setPassword(Settings::instance().getPassword());
- loginJob->setEncryptionMode( KIMAP::LoginJob::AnySslVersion );
+ loginJob->setEncryptionMode( KIMAP::LoginJob::TlsV1 );
loginJob->setAuthenticationMode( KIMAP::LoginJob::Plain );
QObject::connect( loginJob, SIGNAL(result(KJob*)),
diff --git a/fbdaemon/kolabjob.cpp b/fbdaemon/kolabjob.cpp
index d2382bc..652a5ab 100644
--- a/fbdaemon/kolabjob.cpp
+++ b/fbdaemon/kolabjob.cpp
@@ -16,20 +16,14 @@
*/
#include "kolabjob.h"
-#include "authenticationjob.h"
-#include <jobs/probekolabserverjob.h>
+
#include <QTimer>
#include <kimap/logoutjob.h>
#include <kolab/errorhandler.h>
-class UiProxy: public KIMAP::SessionUiProxy {
- public:
- //We need this for ssl errors such as untrusted certificates
- bool ignoreSslError(const KSslErrorUiData& /*errorData*/) {
-// Warning() << "Error during ssl";
- return true;
- }
-};
+#include "uiproxy.h"
+#include "authenticationjob.h"
+#include "jobs/probekolabserverjob.h"
KolabJob::KolabJob(const QString& hostName, qint16 port, const QString& username, QObject* parent)
: KJob(parent),
diff --git a/fbdaemon/settings.cpp b/fbdaemon/settings.cpp
index 6c556e0..c48aef5 100644
--- a/fbdaemon/settings.cpp
+++ b/fbdaemon/settings.cpp
@@ -42,6 +42,15 @@
QString adminpw = settings.value("admin_password", "VerySecret");
settings.endGroup();
*/
+
+Settings::Settings()
+: mTimeframe(-1),
+ mThreshold(-1)
+{
+
+}
+
+
QVariant Settings::getValue(const QString &key, const QVariant &defaultValue) const
{
if (!QFile(mFile).exists()) {
@@ -59,8 +68,19 @@ QVariant Settings::getValue(const QString &key, const QVariant &defaultValue) co
return settings.value(key, defaultValue);
}
+void Settings::setServerUri(const QString& server, qint16 port)
+{
+ mServerUri = server;
+ mPort = port;
+}
+
+
QString Settings::getServerUri(qint16 &port) const
{
+ if (!mServerUri.isEmpty()) {
+ port = mPort;
+ return mServerUri;
+ }
QString serverUri = getValue("uri", "localhost").toString();
if (serverUri.contains(QLatin1String("://"))) {
serverUri.remove(0, serverUri.indexOf(QLatin1String("://"))+3);
@@ -74,32 +94,73 @@ QString Settings::getServerUri(qint16 &port) const
return serverUri;
}
+void Settings::setAuthorizationUser(const QString &user)
+{
+ mAuthorizationUser = user;
+}
+
QString Settings::getAuthorizationUser() const
{
+ if (!mAuthorizationUser.isEmpty()) {
+ return mAuthorizationUser;
+ }
return getValue("admin_login", "cyrus-admin").toString();
}
+void Settings::setPassword(const QString &password)
+{
+ mPassword = password;
+}
+
+
QString Settings::getPassword() const
{
+ if (!mPassword.isEmpty()) {
+ return mPassword;
+ }
return getValue("admin_password", "NoAdminPassword").toString();
}
+void Settings::setTimeframe(int t)
+{
+ mTimeframe = t;
+}
+
int Settings::getTimeframe() const
{
+ if (mTimeframe >= 0) {
+ return mTimeframe;
+ }
QSettings settings(mFile, QSettings::IniFormat);
settings.beginGroup("kolab");
return settings.value("timeframe", 90).toInt();
}
+void Settings::setThreshold(int t)
+{
+ mThreshold = t;
+}
+
int Settings::getThreshold() const
{
+ if (mThreshold >= 0) {
+ return mThreshold;
+ }
QSettings settings(mFile, QSettings::IniFormat);
settings.beginGroup("kolab");
return settings.value("threshold", 0).toInt();
}
+void Settings::setAggregatedICalOutputDirectory(const QString& dir)
+{
+ mAggregatedICalOutputDirectory = dir;
+}
+
QString Settings::getAggregatedICalOutputDirectory() const
{
+ if (!mAggregatedICalOutputDirectory.isEmpty()) {
+ return mAggregatedICalOutputDirectory;
+ }
return QLatin1String("/var/lib/kolab-freebusy");
// QSettings settings(mFile, QSettings::IniFormat);
// settings.beginGroup("kolab");
diff --git a/fbdaemon/settings.h b/fbdaemon/settings.h
index 7455889..b816075 100644
--- a/fbdaemon/settings.h
+++ b/fbdaemon/settings.h
@@ -31,24 +31,39 @@ public:
void setFile(const QString &file) {mFile = file;};
// QString file() {return mFile;};
+ void setServerUri(const QString &server, qint16 port);
QString getServerUri(qint16 &port) const;
+ void setAuthorizationUser(const QString &);
QString getAuthorizationUser() const;
+
+ void setPassword(const QString &);
QString getPassword() const;
//Number of days in f/b
+ void setTimeframe(int);
int getTimeframe() const;
//Number of days after which the f/b is considered out of date
+ void setThreshold(int);
int getThreshold() const;
+ void setAggregatedICalOutputDirectory(const QString &dir);
QString getAggregatedICalOutputDirectory() const;
private:
QVariant getValue(const QString &, const QVariant &) const;
- Settings() {};
+ Settings();
Settings(const Settings &);
Settings & operator= (const Settings &);
QString mFile;
+
+ QString mServerUri;
+ qint16 mPort;
+ QString mAuthorizationUser;
+ QString mPassword;
+ int mTimeframe;
+ int mThreshold;
+ QString mAggregatedICalOutputDirectory;
};
#endif // SETTINGS_H
diff --git a/fbdaemon/tests/CMakeLists.txt b/fbdaemon/tests/CMakeLists.txt
index 8b13789..4132332 100644
--- a/fbdaemon/tests/CMakeLists.txt
+++ b/fbdaemon/tests/CMakeLists.txt
@@ -1 +1,10 @@
+include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+qt4_generate_moc(
+ ${CMAKE_CURRENT_SOURCE_DIR}/fbgeneratortest.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/fbgeneratortest.moc
+)
+add_executable(fbgeneratortest ${FBDAEMON_SRCS} fbgeneratortest.cpp)
+target_link_libraries(fbgeneratortest ${COMMON_DEPENDENCIES} ${QT_QTTEST_LIBRARY} kolabutils)
diff --git a/fbdaemon/tests/fbgeneratortest.cpp b/fbdaemon/tests/fbgeneratortest.cpp
index 0cb9560..30ab638 100644
--- a/fbdaemon/tests/fbgeneratortest.cpp
+++ b/fbdaemon/tests/fbgeneratortest.cpp
@@ -18,76 +18,89 @@
#include <QObject>
#include <QTest>
#include <QDebug>
+#include <QDir>
#include <kolabobject.h>
+#include <freebusy.h>
+#include <kcalconversion.h>
#include "fbdaemon/fbgeneratorjob.h"
+#include "settings.h"
+#include "kolabaccount.h"
+#include "testlib/testutils.h"
class FBGeneratorTest: public QObject
{
Q_OBJECT
- QString sourcehost;
+// QString sourcehost;
QString targethost;
QString user;
QString admin;
QString adminpw;
qint16 port;
+ QList<Folder> folders;
public:
- explicit MigrationScenarioTest(QObject* parent = 0)
+ explicit FBGeneratorTest(QObject* parent = 0)
: QObject(parent),
- sourcehost("192.168.122.104"),
+// sourcehost("192.168.122.104"),
targethost("192.168.122.10"),
user("john.doe@example.org"),
admin("cyrus-admin"),
adminpw("admin"),
port(143)
{
+ Object calObj1;
+ KCalCore::Event::Ptr event(new KCalCore::Event());
+ event->setUid("uid1");
+ event->setDtStart(KDateTime::currentUtcDateTime());
+ event->setDtEnd(KDateTime::currentUtcDateTime().addSecs(3600));
+ calObj1.message = Kolab::KolabObjectWriter::writeEvent(event, Kolab::KolabV3, "fbtest");
+ folders << Folder("Calendar", Kolab::EventType, QList<Object>() << calObj1);
+
+// folders << Folder("Freebusy", Kolab::FreebusyType, QList<Object>()/* << fbObj1*/);
}
- virtual ~MigrationScenarioTest(){};
-
private:
- void setupSourceAccount()
- {
- KolabServer *kolabServer = new KolabServer(this);
- kolabServer->setHost(sourcehost, port);
- kolabServer->setAdminCredentials(admin, adminpw);
- KolabAccount *account = kolabServer->getAccount(user);
- account->cleanAccount();
- createFolders(account, folders);
- }
-
void setupTargetAccount()
{
- //Depending on the test scenario, clear target account
+ QObject obj;
+ KolabAccount *account = new KolabAccount(&obj);
+ account->setHost(targethost, port);
+ account->setCredentials(user, adminpw, admin);
+ account->init();
+
+ account->cleanAccount();
+ createFolders(account, folders);
}
void executeGeneration()
{
+ Settings::instance().setAuthorizationUser(admin);
+ Settings::instance().setPassword(adminpw);
+ Settings::instance().setServerUri(targethost, port);
+ Settings::instance().setThreshold(10);
+ Settings::instance().setTimeframe(60);
+ Settings::instance().setAggregatedICalOutputDirectory(QDir::tempPath());
+
QObject obj;
-
FBGeneratorJob *job = new FBGeneratorJob(targethost, port, user, &obj);
job->exec();
}
- void checkFolders(SourceAccount *account, const QList<Folder> &folders)
+ void checkFolders(KolabAccount *account, const QList<Folder> &folders)
{
const QStringList &receivedFolders = account->lookupFolderList();
- QStringList::const_iterator recIt = receivedFolders.constBegin();
- QList<Folder>::const_iterator foldersIt = folders.constBegin();
- QCOMPARE(receivedFolders.size(), folders.size());
- for (;foldersIt != folders.constEnd() && recIt != receivedFolders.constEnd(); ++foldersIt, ++recIt) {
- qDebug() << "Folder: " << *recIt;
- QCOMPARE(*recIt, foldersIt->name);
- //TODO Check folder annotations
-
- const QList<Object> &objects = account->getObjects(foldersIt->name);
- QCOMPARE(objects.size(), foldersIt->objects.size());
+ qDebug() << receivedFolders;
+ foreach(const Folder &folder, folders) {
+ qDebug() << folder.name;
+ QVERIFY(receivedFolders.contains(folder.name));
+ const QList<Object> &objects = account->getObjects(folder.name);
+ QCOMPARE(objects.size(), folder.objects.size());
QList<Object>::const_iterator recObjIt = objects.constBegin();
- QList<Object>::const_iterator objIt = foldersIt->objects.constBegin();
- for (;objIt != foldersIt->objects.constEnd() && recObjIt != objects.constEnd(); ++objIt, ++recObjIt) {
+ QList<Object>::const_iterator objIt = folder.objects.constBegin();
+ for (;objIt != folder.objects.constEnd() && recObjIt != objects.constEnd(); ++objIt, ++recObjIt) {
//TODO Check converted messages
foreach (const QByteArray &flag, objIt->flags) {
QVERIFY(recObjIt->flags.contains(flag));
@@ -98,21 +111,24 @@ private:
void checkTargetAccount()
{
-
+ //Check that fb-object and aggregated fb object has been created
QObject obj;
- KolabSourceServer *kolabSourceServer = new KolabSourceServer(&obj);
- kolabSourceServer->setHost(targethost, port);
- kolabSourceServer->setAdminCredentials(admin, adminpw);
- kolabSourceServer->setSingleUser(user);
+ KolabAccount *account = new KolabAccount(&obj);
+ account->setHost(targethost, port);
+ account->setCredentials(user, adminpw, admin);
+ account->init();
- SourceAccount *account = kolabSourceServer->getSourceAccount(user);
- checkFolders(account, folders);
- account->logout();
- }
- void checkSourceAccount()
- {
- //If we start clearing the source server on successful migration, check that messages are really gone.
+ Object fbObj1;
+ Kolab::Freebusy fb;
+ fb.setStart(Kolab::Conversion::fromDate(KDateTime::currentUtcDateTime()));
+ fb.setEnd(Kolab::Conversion::fromDate(KDateTime::currentUtcDateTime().addDays(60)));
+ fbObj1.message = Kolab::KolabObjectWriter::writeFreebusy(fb, Kolab::KolabV3, "fbtest");
+
+ QList<Folder> targetFolders;
+ targetFolders << Folder("Freebusy", Kolab::FreebusyType, QList<Object>() << fbObj1);
+ checkFolders(account, targetFolders);
+ account->logout();
}
private slots:
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 60bffe9..f105f49 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -27,3 +27,5 @@ set(SRCS ${JOBS_SRCS}
add_library(kolabutils SHARED ${SRCS})
target_link_libraries(kolabutils ${COMMON_DEPENDENCIES})
+
+add_subdirectory(testlib) \ No newline at end of file
diff --git a/lib/jobs/probekolabserverjob.cpp b/lib/jobs/probekolabserverjob.cpp
index 197a283..60cd89e 100644
--- a/lib/jobs/probekolabserverjob.cpp
+++ b/lib/jobs/probekolabserverjob.cpp
@@ -100,7 +100,7 @@ void ProbeKolabServerJob::findKolabFoldersDone(KJob *job)
// qDebug() << "Found kolab folders: " << findJob->getKolabFolders();
mKolabFolders = findJob->getKolabFolders();
- //TODO and now create the missing defaults
+ //TODO Setting up the missing folders shouldn't be part of the ProbeJob, and it's probably only used in one place in here => separate
QString rootFolder;
QStringList toCreate;
foreach (const QString &folderType, mFoldersToCreate) {
diff --git a/lib/jobs/setupkolabfoldersjob.cpp b/lib/jobs/setupkolabfoldersjob.cpp
index b906fcb..f719721 100644
--- a/lib/jobs/setupkolabfoldersjob.cpp
+++ b/lib/jobs/setupkolabfoldersjob.cpp
@@ -76,6 +76,10 @@ void SetupKolabFoldersJob::createMailbox()
}
m_currentFolderType = m_folderTypes.takeFirst();
Kolab::FolderType folderType = Kolab::folderTypeFromString(m_currentFolderType.toStdString());
+ //FIXME: this is only required for libkolab < 0.4.0. Afterwards folderTypeFromString should do the job
+ if (!m_currentFolderType.compare(QLatin1String("freebusy"), Qt::CaseInsensitive)) {
+ folderType = Kolab::FreebusyType;
+ }
if (folderType == Kolab::MailType) {
Warning() << "unknown kolab type: " << m_currentFolderType;
setError(KJob::UserDefinedError);
diff --git a/lib/kolabaccount.cpp b/lib/kolabaccount.cpp
index c55511f..7048a99 100644
--- a/lib/kolabaccount.cpp
+++ b/lib/kolabaccount.cpp
@@ -18,6 +18,7 @@
#include "kolabaccount.h"
#include "uiproxy.h"
#include <jobs/setupkolabfoldersjob.h>
+#include "jobs/fetchmessagesjob.h"
#include <kimap/session.h>
#include <kimap/logoutjob.h>
#include <kimap/appendjob.h>
@@ -71,6 +72,7 @@ bool KolabAccount::init()
mSession = new KIMAP::Session( mHost, mPort, this );
mSession->setUiProxy( KIMAP::SessionUiProxy::Ptr(new UiProxy()) );
KIMAP::LoginJob *loginJob = new KIMAP::LoginJob( mSession );
+ Debug() << mUsername << mAuthorizationName << mPw;
if (mAuthorizationName != mUsername) {
loginJob->setAuthorizationName(mAuthorizationName);
}
@@ -284,7 +286,6 @@ void KolabAccount::createFolder(const QString& name, Kolab::FolderType folderTyp
createFolder(name, QString::fromStdString(Kolab::folderAnnotation(folderType)).toLatin1());
}
-
void KolabAccount::setupFolders()
{
if (mDryRun) {
@@ -311,4 +312,40 @@ void KolabAccount::setupFolders()
createFolder("Trash", KOLAB_FOLDER_TYPE_MAIL KOLAB_FOLDER_TYPE_TRASH_SUFFIX);
}
+QList<Object> KolabAccount::getObjects(const QString& folder)
+{
+// Debug() << folder;
+ FetchMessagesJob *fetchJob = new FetchMessagesJob(folder, mSession, this);
+ fetchJob->exec();
+ Debug() << fetchJob->getMessages().size();
+ QList<Object> messages;
+ foreach (const KMime::Message::Ptr &msg, fetchJob->getMessages()) {
+ Object obj;
+ obj.message = msg;
+ obj.flags = fetchJob->getFlags(msg);
+ messages.append(obj);
+ }
+ return messages;
+}
+
+QStringList KolabAccount::lookupFolderList()
+{
+// Debug() << "lookupFolderList" << mHost << mPort << mUsername << mPw;
+ init();
+ mMailboxes.clear();
+
+ KIMAP::ListJob *listJob = new KIMAP::ListJob(mSession);
+ listJob->setOption(KIMAP::ListJob::IncludeUnsubscribed);
+ listJob->setQueriedNamespaces(mPersonalNamespaces);
+ QObject::connect( listJob, SIGNAL(mailBoxesReceived(QList<KIMAP::MailBoxDescriptor>,QList<QList<QByteArray> >)),
+ this, SLOT(mailBoxesReceived(QList<KIMAP::MailBoxDescriptor>,QList<QList<QByteArray> >)));
+ listJob->exec();
+ Debug() << "found " << mMailboxes.size();
+
+ QStringList mailboxes;
+ foreach (const KIMAP::MailBoxDescriptor &descriptor, mMailboxes) {
+ mailboxes.append(descriptor.name);
+ }
+ return mailboxes;
+}
diff --git a/lib/kolabaccount.h b/lib/kolabaccount.h
index d2bdea8..3d32f1f 100644
--- a/lib/kolabaccount.h
+++ b/lib/kolabaccount.h
@@ -47,6 +47,9 @@ public:
void logout();
+ QList<Object> getObjects(const QString& folder);
+ QStringList lookupFolderList();
+
private slots:
void mailBoxesReceived(const QList<KIMAP::MailBoxDescriptor> &descriptors, const QList< QList< QByteArray > > &flags);
private:
diff --git a/lib/testlib/testutils.h b/lib/testlib/testutils.h
new file mode 100644
index 0000000..a5bf119
--- /dev/null
+++ b/lib/testlib/testutils.h
@@ -0,0 +1,21 @@
+#include <QList>
+#include "kolabaccount.h"
+
+
+struct Folder
+{
+ Folder(const QString &n, Kolab::FolderType type = Kolab::MailType, const QList<Object> &obj = QList<Object>()): objects(obj), name(n), folderType(type){};
+ QList<Object> objects;
+ QString name;
+ Kolab::FolderType folderType;
+};
+
+void createFolders(KolabAccount *account, const QList<Folder> &folders)
+{
+ foreach (const Folder &folder, folders) {
+ account->createFolder(folder.name, folder.folderType);
+ foreach(const Object &obj, folder.objects) {
+ account->appendObject(obj, folder.name);
+ }
+ }
+} \ No newline at end of file
diff --git a/migrationutility/tests/migrationscenariotest.cpp b/migrationutility/tests/migrationscenariotest.cpp
index e54cd88..0381e29 100644
--- a/migrationutility/tests/migrationscenariotest.cpp
+++ b/migrationutility/tests/migrationscenariotest.cpp
@@ -23,16 +23,9 @@
#include "migrationutility/kolabserver.h"
#include "migrationutility/sourceserver.h"
#include "lib/kolabaccount.h"
+#include "lib/testlib/testutils.h"
-struct Folder
-{
- Folder(const QString &n, Kolab::FolderType type = Kolab::MailType, const QList<Object> &obj = QList<Object>()): objects(obj), name(n), folderType(type){};
- QList<Object> objects;
- QString name;
- Kolab::FolderType folderType;
-};
-
/**
* This test simulates an entier migration scenario.
*
@@ -58,6 +51,7 @@ class MigrationScenarioTest: public QObject
Object calObj1;
KCalCore::Event::Ptr event(new KCalCore::Event());
event->setUid(uid);
+ event->setDtStart(KDateTime::currentUtcDateTime());
calObj1.message = Kolab::KolabObjectWriter::writeEvent(event, Kolab::KolabV2, "migrationtest");
calObj1.flags << QByteArray("\\Seen");
return calObj1;
@@ -99,15 +93,6 @@ private:
return kolabSourceServer;
}
- void createFolders(KolabAccount *account, const QList<Folder> &folders)
- {
- foreach (const Folder &folder, folders) {
- account->createFolder(folder.name, folder.folderType);
- foreach(const Object &obj, folder.objects) {
- account->appendObject(obj, folder.name);
- }
- }
- }
void setupSourceAccount()
{
@@ -158,7 +143,7 @@ private:
QList<Object>::const_iterator recObjIt = objects.constBegin();
QList<Object>::const_iterator objIt = foldersIt->objects.constBegin();
for (;objIt != foldersIt->objects.constEnd() && recObjIt != objects.constEnd(); ++objIt, ++recObjIt) {
- //TODO Check converted messages
+ QCOMPARE(*Kolab::KolabObjectReader(recObjIt->message).getEvent(), *Kolab::KolabObjectReader(objIt->message).getEvent());
foreach (const QByteArray &flag, objIt->flags) {
QVERIFY(recObjIt->flags.contains(flag));
}
diff --git a/migrationutility/tests/migrationscenariotest.h b/migrationutility/tests/migrationscenariotest.h
deleted file mode 100644
index 525e678..0000000
--- a/migrationutility/tests/migrationscenariotest.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2012 Christian Mollekopf <mollekopf@kolabsys.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MIGRATIONSCENARIOTEST_H
-#define MIGRATIONSCENARIOTEST_H
-
-class MigrationScenarioTest
-{
-};
-
-#endif // MIGRATIONSCENARIOTEST_H