Commit 0aae2aa8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Autotest this class too

parent 1cdc9655
......@@ -35,7 +35,7 @@ set( backupresourcefilejobtest_SRCS backupresourcefilejobtest.cpp )
add_executable( backupresourcefilejobtest ${backupresourcefilejobtest_SRCS})
add_test(NAME backupresourcefilejobtest COMMAND backupresourcefilejobtest)
ecm_mark_as_test(backupresourcefilejobtest)
target_link_libraries( backupresourcefilejobtest Qt5::Test KF5::ConfigCore pimdataexporterprivate)
target_link_libraries( backupresourcefilejobtest Qt5::Test KF5::ConfigCore pimdataexporterprivate KF5::Archive)
###
add_subdirectory(notes)
......
......@@ -18,6 +18,7 @@
*/
#include "backupresourcefilejobtest.h"
#include "backupresourcefilejob.h"
#include <QTest>
QTEST_MAIN(backupResourceFileJobTest)
backupResourceFileJobTest::backupResourceFileJobTest(QObject *parent)
......@@ -25,3 +26,12 @@ backupResourceFileJobTest::backupResourceFileJobTest(QObject *parent)
{
}
void backupResourceFileJobTest::shouldHaveDefaultValue()
{
backupResourceFileJob *job = new backupResourceFileJob;
QVERIFY(!job->canStart());
QVERIFY(job->identifier().isEmpty());
QVERIFY(!job->zip());
QVERIFY(job->defaultPath().isEmpty());
}
......@@ -28,6 +28,8 @@ class backupResourceFileJobTest : public QObject
public:
explicit backupResourceFileJobTest(QObject *parent = nullptr);
~backupResourceFileJobTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // BACKUPRESOURCEFILEJOBTEST_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