Commit 9f15fcfa authored by Laurent Montel's avatar Laurent Montel 😁

Add autotests

parent bf779fdc
......@@ -18,4 +18,4 @@ target_link_libraries(messageviewer_donottrackplugin
install(TARGETS messageviewer_donottrackplugin DESTINATION ${PLUGIN_INSTALL_DIR}/messageviewer)
#add_subdirectory(autotests)
add_subdirectory(autotests)
set( donottrackpluginurlinterceptortest_SRCS donottrackpluginurlinterceptortest.cpp ../donottrackpluginurlinterceptor.cpp ../donottrackinterceptorinterface.cpp)
kconfig_add_kcfg_files(donottrackpluginurlinterceptortest_SRCS
../settings/donottrack.kcfgc
)
add_executable( donottrackpluginurlinterceptortest ${donottrackpluginurlinterceptortest_SRCS})
add_test(donottrackpluginurlinterceptortest donottrackpluginurlinterceptortest)
ecm_mark_as_test(donottrackpluginurlinterceptortest)
target_link_libraries( donottrackpluginurlinterceptortest Qt5::Test Qt5::Widgets KF5::MessageViewer Qt5::WebEngine Qt5::WebEngineWidgets)
/*
Copyright (c) 2016 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 "donottrackpluginurlinterceptortest.h"
#include "../donottrackpluginurlinterceptor.h"
#include <QTest>
DoNotTrackPluginUrlInterceptorTest::DoNotTrackPluginUrlInterceptorTest(QObject *parent)
: QObject(parent)
{
}
DoNotTrackPluginUrlInterceptorTest::~DoNotTrackPluginUrlInterceptorTest()
{
}
void DoNotTrackPluginUrlInterceptorTest::shouldHaveDefaultValue()
{
DoNotTrackPluginUrlInterceptor w;
QVERIFY(w.createInterface(this));
}
QTEST_MAIN(DoNotTrackPluginUrlInterceptorTest)
/*
Copyright (c) 2016 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 DONOTTRACKPLUGINURLINTERCEPTORTEST_H
#define DONOTTRACKPLUGINURLINTERCEPTORTEST_H
#include <QObject>
class DoNotTrackPluginUrlInterceptorTest : public QObject
{
Q_OBJECT
public:
explicit DoNotTrackPluginUrlInterceptorTest(QObject *parent = Q_NULLPTR);
~DoNotTrackPluginUrlInterceptorTest();
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // DONOTTRACKPLUGINURLINTERCEPTORTEST_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