Start create autotest

wilder
Laurent Montel 6 years ago
parent e82ad02975
commit 363fa27904
  1. 1
      src/CMakeLists.txt
  2. 10
      src/job/autotests/CMakeLists.txt
  3. 28
      src/job/autotests/createreplymessagejobtest.cpp
  4. 34
      src/job/autotests/createreplymessagejobtest.h

@ -416,6 +416,7 @@ if(BUILD_TESTING)
add_subdirectory(editor/warningwidgets/autotests)
add_subdirectory(sieveimapinterface/tests/)
add_subdirectory(undosend/autotests/)
add_subdirectory(job/autotests/)
endif()
########### install files ###############

@ -0,0 +1,10 @@
macro(add_kmail_job_unittest _source)
get_filename_component(_name ${_source} NAME_WE)
ecm_add_test(${_source}
TEST_NAME ${_name}
LINK_LIBRARIES kmailprivate Qt5::Test Qt5::Widgets
)
endmacro ()
add_kmail_job_unittest(createreplymessagejobtest.cpp)

@ -0,0 +1,28 @@
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "createreplymessagejobtest.h"
#include <QTest>
QTEST_MAIN(CreateReplyMessageJobTest)
CreateReplyMessageJobTest::CreateReplyMessageJobTest(QObject *parent)
: QObject(parent)
{
}

@ -0,0 +1,34 @@
/*
Copyright (C) 2020 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CREATEREPLYMESSAGEJOBTEST_H
#define CREATEREPLYMESSAGEJOBTEST_H
#include <QObject>
class CreateReplyMessageJobTest : public QObject
{
Q_OBJECT
public:
explicit CreateReplyMessageJobTest(QObject *parent = nullptr);
~CreateReplyMessageJobTest() = default;
};
#endif // CREATEREPLYMESSAGEJOBTEST_H
Loading…
Cancel
Save