Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit c1467973 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement autotest

parent 0506db6d
......@@ -13,3 +13,5 @@ target_link_libraries(messageviewer_gravatarconfigplugin
KF5::Gravatar
KF5::I18n
)
add_subdirectory(autotests)
macro(add_gravatar_plugin_unittest _source _additional)
set( _test ${_source} ${_additional})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
add_test(NAME ${_name} COMMAND ${_name} )
ecm_mark_as_test(gravatarplugin-${_name})
target_link_libraries( ${_name} KF5::PimCommon Qt5::Test KF5::I18n)
endmacro ()
add_gravatar_plugin_unittest(gravatarconfiguresettingspluginwidgettest.cpp "")
add_gravatar_plugin_unittest(gravatarconfiguresettingsplugindialogtest.cpp "")
/*
Copyright (C) 2018 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 as published by the Free Software Foundation; either
version 2 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "gravatarconfiguresettingsplugindialogtest.h"
#include <QTest>
QTEST_MAIN(GravatarConfigureSettingsPluginDialogTest)
GravatarConfigureSettingsPluginDialogTest::GravatarConfigureSettingsPluginDialogTest(QObject *parent)
: QObject(parent)
{
}
/*
Copyright (C) 2018 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 as published by the Free Software Foundation; either
version 2 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef GRAVATARCONFIGURESETTINGSPLUGINDIALOGTEST_H
#define GRAVATARCONFIGURESETTINGSPLUGINDIALOGTEST_H
#include <QObject>
class GravatarConfigureSettingsPluginDialogTest : public QObject
{
Q_OBJECT
public:
explicit GravatarConfigureSettingsPluginDialogTest(QObject *parent = nullptr);
~GravatarConfigureSettingsPluginDialogTest() = default;
};
#endif // GRAVATARCONFIGURESETTINGSPLUGINDIALOGTEST_H
/*
Copyright (C) 2018 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 as published by the Free Software Foundation; either
version 2 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "gravatarconfiguresettingspluginwidgettest.h"
#include <QTest>
QTEST_MAIN(GravatarConfigureSettingsPluginWidgetTest)
GravatarConfigureSettingsPluginWidgetTest::GravatarConfigureSettingsPluginWidgetTest(QObject *parent)
: QObject(parent)
{
}
void GravatarConfigureSettingsPluginWidgetTest::shouldHaveDefaultValue()
{
//TODO
}
/*
Copyright (C) 2018 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 as published by the Free Software Foundation; either
version 2 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef GRAVATARCONFIGURESETTINGSPLUGINWIDGETTEST_H
#define GRAVATARCONFIGURESETTINGSPLUGINWIDGETTEST_H
#include <QObject>
class GravatarConfigureSettingsPluginWidgetTest : public QObject
{
Q_OBJECT
public:
explicit GravatarConfigureSettingsPluginWidgetTest(QObject *parent = nullptr);
~GravatarConfigureSettingsPluginWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // GRAVATARCONFIGURESETTINGSPLUGINWIDGETTEST_H
......@@ -18,6 +18,7 @@
*/
#include "gravatarconfiguresettingsplugin.h"
#include "gravatarconfiguresettingsplugindialog.h"
#include <kpluginfactory.h>
K_PLUGIN_CLASS_WITH_JSON(GravatarConfigureSettingsPlugin, "messageviewer_gravatarconfigplugin.json")
......@@ -36,6 +37,9 @@ GravatarConfigureSettingsPlugin::~GravatarConfigureSettingsPlugin()
void GravatarConfigureSettingsPlugin::showConfigureDialog(QWidget *parent)
{
QPointer<GravatarConfigureSettingsPluginDialog> dlg = new GravatarConfigureSettingsPluginDialog(parent);
dlg->exec();
delete dlg;
}
#include "gravatarconfiguresettingsplugin.moc"
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