Commit 7bf9ac3c authored by Laurent Montel's avatar Laurent Montel 😁

Start to create autotests

parent 20c7fcfd
......@@ -8,3 +8,7 @@ set( mailcommon_collectionannotationsattributetest_source collectionannotationsa
kde4_add_unit_test( collectionannotationsattributetest ${mailcommon_collectionannotationsattributetest_source})
target_link_libraries( collectionannotationsattributetest ${QT_QTTEST_LIBRARY} ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${KDEPIMLIBS_AKONADI_LIBS})
set( mailcommon_expirecollectionattributetest_source expirecollectionattributetest.cpp )
kde4_add_unit_test( expirecollectionattributetest ${mailcommon_expirecollectionattributetest_source})
target_link_libraries( expirecollectionattributetest ${QT_QTTEST_LIBRARY} ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${KDEPIMLIBS_AKONADI_LIBS})
/*
Copyright (c) 2014 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "expirecollectionattributetest.h"
#include <qtest_kde.h>
ExpireCollectionAttributeTest::ExpireCollectionAttributeTest(QObject *parent)
: QObject(parent)
{
}
ExpireCollectionAttributeTest::~ExpireCollectionAttributeTest()
{
}
QTEST_KDEMAIN(ExpireCollectionAttributeTest, NoGUI)
/*
Copyright (c) 2014 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
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
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef EXPIRECOLLECTIONATTRIBUTETEST_H
#define EXPIRECOLLECTIONATTRIBUTETEST_H
#include <QObject>
class ExpireCollectionAttributeTest : public QObject
{
Q_OBJECT
public:
explicit ExpireCollectionAttributeTest(QObject *parent = 0);
~ExpireCollectionAttributeTest();
};
#endif // EXPIRECOLLECTIONATTRIBUTETEST_H
......@@ -59,7 +59,6 @@ public:
static ExpireCollectionAttribute *expirationCollectionAttribute(
const Akonadi::Collection &collection, bool &mustDeleteExpirationAttribute );
void loadFromConfig( const Akonadi::Collection &collection );
void daysToExpire( int &unreadDays, int &readDays );
......@@ -136,6 +135,7 @@ public:
ExpireUnits readExpireUnits() const;
private:
void loadFromConfig( const Akonadi::Collection &collection );
bool mExpireMessages; // true if old messages are expired
int mUnreadExpireAge; // Given in unreadExpireUnits
int mReadExpireAge; // Given in readExpireUnits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment