Commit 699f3814 authored by Laurent Montel's avatar Laurent Montel 😁

Add more unittest

parent 8b6b160b
......@@ -20,3 +20,5 @@ endmacro ()
add_noteshared_unittest( notedisplayattributetest.cpp )
add_noteshared_unittest( notealarmattributetest.cpp )
add_noteshared_unittest( showfoldernotesattributetest.cpp )
add_noteshared_unittest( notelockattributetest.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 "notelockattributetest.h"
#include "../notelockattribute.h"
#include <qtest_kde.h>
NoteLockAttributeTest::NoteLockAttributeTest(QObject *parent)
: QObject(parent)
{
}
NoteLockAttributeTest::~NoteLockAttributeTest()
{
}
void NoteLockAttributeTest::shouldHaveType()
{
NoteShared::NoteLockAttribute attr;
QCOMPARE(attr.type(), QByteArray("KJotsLockAttribute"));
}
QTEST_KDEMAIN(NoteLockAttributeTest, 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 NOTELOCKATTRIBUTETEST_H
#define NOTELOCKATTRIBUTETEST_H
#include <QObject>
class NoteLockAttributeTest : public QObject
{
Q_OBJECT
public:
explicit NoteLockAttributeTest(QObject *parent = 0);
~NoteLockAttributeTest();
private Q_SLOTS:
void shouldHaveType();
};
#endif // NOTELOCKATTRIBUTETEST_H
/*
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 "showfoldernotesattributetest.h"
#include "../showfoldernotesattribute.h"
#include <qtest_kde.h>
ShowFolderNotesAttributeTest::ShowFolderNotesAttributeTest(QObject *parent)
: QObject(parent)
{
}
ShowFolderNotesAttributeTest::~ShowFolderNotesAttributeTest()
{
}
void ShowFolderNotesAttributeTest::shouldHaveType()
{
NoteShared::ShowFolderNotesAttribute attr;
QCOMPARE(attr.type(), QByteArray("showfoldernotesattribute"));
}
QTEST_KDEMAIN(ShowFolderNotesAttributeTest, 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 SHOWFOLDERNOTESATTRIBUTETEST_H
#define SHOWFOLDERNOTESATTRIBUTETEST_H
#include <QObject>
class ShowFolderNotesAttributeTest : public QObject
{
Q_OBJECT
public:
explicit ShowFolderNotesAttributeTest(QObject *parent = 0);
~ShowFolderNotesAttributeTest();
private Q_SLOTS:
void shouldHaveType();
};
#endif // SHOWFOLDERNOTESATTRIBUTETEST_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