diff --git a/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.cpp b/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.cpp index 280433c9..39829f92 100644 --- a/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.cpp +++ b/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.cpp @@ -1,40 +1,52 @@ /* Copyright (C) 2018-2019 Laurent Montel 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 "dkimchecksignaturejobtest.h" #include "dkim-verify/dkimchecksignaturejob.h" #include QTEST_MAIN(DKIMCheckSignatureJobTest) DKIMCheckSignatureJobTest::DKIMCheckSignatureJobTest(QObject *parent) : QObject(parent) { } void DKIMCheckSignatureJobTest::shouldHaveDefaultValues() { MessageViewer::DKIMCheckSignatureJob job; QVERIFY(job.dkimValue().isEmpty()); QVERIFY(job.headerCanonizationResult().isEmpty()); QVERIFY(job.bodyCanonizationResult().isEmpty()); QCOMPARE(job.status(), MessageViewer::DKIMCheckSignatureJob::DKIMStatus::Unknown); QCOMPARE(job.error(), MessageViewer::DKIMCheckSignatureJob::DKIMError::Any); QCOMPARE(job.warning(), MessageViewer::DKIMCheckSignatureJob::DKIMWarning::Any); QVERIFY(!job.saveKey()); } + +void DKIMCheckSignatureJobTest::shouldTestMail_data() +{ + QTest::addColumn("fileName"); + QTest::addRow("test1") << QStringLiteral("foo"); +} + +void DKIMCheckSignatureJobTest::shouldTestMail() +{ + QFETCH(QString, fileName); + +} diff --git a/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.h b/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.h index 2aa04d68..dc46529e 100644 --- a/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.h +++ b/messageviewer/src/dkim-verify/autotests/dkimchecksignaturejobtest.h @@ -1,35 +1,37 @@ /* Copyright (C) 2018-2019 Laurent Montel 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 DKIMCHECKSIGNATUREJOBTEST_H #define DKIMCHECKSIGNATUREJOBTEST_H #include class DKIMCheckSignatureJobTest : public QObject { Q_OBJECT public: explicit DKIMCheckSignatureJobTest(QObject *parent = nullptr); ~DKIMCheckSignatureJobTest() = default; private Q_SLOTS: void shouldHaveDefaultValues(); + void shouldTestMail(); + void shouldTestMail_data(); }; #endif // DKIMCHECKSIGNATUREJOBTEST_H