Commit 259de939 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename autotest

parent 81ff08b1
......@@ -32,11 +32,11 @@ ecm_mark_as_test(resourceconverterclasstest)
target_link_libraries( resourceconverterclasstest Qt5::Test KF5::ConfigCore test_resourceconverter)
#####
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 KF5::Archive)
set( backupresourcefilejobimpltest_SRCS backupresourcefilejobimpltest.cpp )
add_executable( backupresourcefilejobimpltest ${backupresourcefilejobimpltest_SRCS})
add_test(NAME backupresourcefilejobimpltest COMMAND backupresourcefilejobimpltest)
ecm_mark_as_test(backupresourcefilejobimpltest)
target_link_libraries( backupresourcefilejobimpltest Qt5::Test KF5::ConfigCore pimdataexporterprivate KF5::Archive)
###
add_subdirectory(notes)
......
......@@ -17,19 +17,19 @@
Boston, MA 02110-1301, USA.
*/
#include "backupresourcefilejobtest.h"
#include "backupresourcefilejobbase.h"
#include "backupresourcefilejobimpltest.h"
#include "backupresourcefilejobimpl.h"
#include <QTest>
QTEST_MAIN(BackupResourceFileJobTest)
BackupResourceFileJobTest::BackupResourceFileJobTest(QObject *parent)
QTEST_MAIN(BackupResourceFileJobImplTest)
BackupResourceFileJobImplTest::BackupResourceFileJobImplTest(QObject *parent)
: QObject(parent)
{
}
void BackupResourceFileJobTest::shouldHaveDefaultValue()
void BackupResourceFileJobImplTest::shouldHaveDefaultValue()
{
BackupResourceFileJobBase *job = new BackupResourceFileJobBase;
BackupResourceFileJobImpl *job = new BackupResourceFileJobImpl;
QVERIFY(!job->canStart());
QVERIFY(job->identifier().isEmpty());
QVERIFY(!job->zip());
......
......@@ -22,12 +22,12 @@
#include <QObject>
class BackupResourceFileJobTest : public QObject
class BackupResourceFileJobImplTest : public QObject
{
Q_OBJECT
public:
explicit BackupResourceFileJobTest(QObject *parent = nullptr);
~BackupResourceFileJobTest() = default;
explicit BackupResourceFileJobImplTest(QObject *parent = nullptr);
~BackupResourceFileJobImplTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
......
......@@ -37,13 +37,6 @@ BackupResourceFileJobBase::~BackupResourceFileJobBase()
}
QString BackupResourceFileJobBase::resourcePath(const QString &identifier) const
{
ResourceConverterImpl converter;
const QString url = converter.resourcePath(identifier);
return url;
}
void BackupResourceFileJobBase::start()
{
if (!canStart()) {
......
......@@ -46,7 +46,7 @@ public:
Q_REQUIRED_RESULT QString defaultPath() const;
void setDefaultPath(const QString &defaultPath);
virtual Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const;
virtual Q_REQUIRED_RESULT QString resourcePath(const QString &identifier) const = 0;
Q_SIGNALS:
void error(const QString &);
void info(const QString &);
......
......@@ -23,7 +23,8 @@
#include "backupresourcefilejobbase.h"
class BackupResourceFileJobImpl : public BackupResourceFileJobBase
#include "pimdataexporter_export.h"
class PIMDATAEXPORTER_EXPORT BackupResourceFileJobImpl : public BackupResourceFileJobBase
{
Q_OBJECT
public:
......
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