Commit 3eb68ea4 authored by Laurent Montel's avatar Laurent Montel 😁

Add unitest

parent baf4c503
......@@ -62,6 +62,7 @@ add_messagecomposer_test( maintextjobtest.cpp )
# Composer.
add_messagecomposer_test( composertest.cpp )
add_messagecomposer_cryptotest( cryptocomposertest.cpp )
add_messagecomposer_test( infoparttest.cpp )
# Crypto
add_messagecomposer_cryptotest( signjobtest.cpp )
......
/*
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 "infoparttest.h"
#include "../part/infopart.h"
#include <qtest_kde.h>
InfoPartTest::InfoPartTest(QObject *parent)
: QObject(parent)
{
}
InfoPartTest::~InfoPartTest()
{
}
void InfoPartTest::shouldHaveDefaultValue()
{
MessageComposer::InfoPart infopart;
QCOMPARE(infopart.transportId(), 0);
QVERIFY(!infopart.urgent());
}
QTEST_KDEMAIN(InfoPartTest, 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 INFOPARTTEST_H
#define INFOPARTTEST_H
#include <QObject>
class InfoPartTest : public QObject
{
Q_OBJECT
public:
explicit InfoPartTest(QObject *parent=0);
~InfoPartTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // INFOPARTTEST_H
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