Commit d7d7b2cd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to call several test

parent 0436a755
......@@ -63,15 +63,20 @@ ExportAddressbookJobInterfaceTest::ExportAddressbookJobInterfaceTest(QObject *pa
{
}
void ExportAddressbookJobInterfaceTest::exportAddressBookConfigTest1()
void ExportAddressbookJobInterfaceTest::exportAddressBookConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportAddressbookJobInterfaceTest::exportAddressBookConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
ExportAddressbookJobInterfaceTestImpl *impl = new ExportAddressbookJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->setPathConfig(configpath);
ExportAddressbookJobInterfaceTestImpl *exportNote = new ExportAddressbookJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete impl;
delete exportNote;
}
......@@ -47,7 +47,8 @@ public:
explicit ExportAddressbookJobInterfaceTest(QObject *parent = nullptr);
~ExportAddressbookJobInterfaceTest() = default;
private Q_SLOTS:
void exportAddressBookConfigTest1();
void exportAddressBookConfig();
void exportAddressBookConfig_data();
};
#endif // EXPORTADDRESSBOOKJOBINTERFACETEST_H
......@@ -42,11 +42,18 @@ ExportAkregatorJobInterfaceTest::ExportAkregatorJobInterfaceTest(QObject *parent
{
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfigTest1()
void ExportAkregatorJobInterfaceTest::exportAkregatorConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
file->setPathConfig(configpath);
ExportAkregatorJobInterfaceTestImpl *exportNote = new ExportAkregatorJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
......
......@@ -39,7 +39,8 @@ public:
explicit ExportAkregatorJobInterfaceTest(QObject *parent = nullptr);
~ExportAkregatorJobInterfaceTest() = default;
private Q_SLOTS:
void exportAkregatorConfigTest1();
void exportAkregatorConfig();
void exportAkregatorConfig_data();
};
#endif // EXPORTAKREGATORJOBINTERFACETEST_H
......@@ -52,15 +52,20 @@ ExportAlarmJobInterfaceTest::ExportAlarmJobInterfaceTest(QObject *parent)
{
}
void ExportAlarmJobInterfaceTest::exportAlarmConfigTest1()
void ExportAlarmJobInterfaceTest::exportAlarmConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportAlarmJobInterfaceTest::exportAlarmConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
file->setPathConfig(configpath);
ExportAlarmJobInterfaceTestImpl *exportNote = new ExportAlarmJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete exportNote;
}
......@@ -43,7 +43,8 @@ public:
explicit ExportAlarmJobInterfaceTest(QObject *parent = nullptr);
~ExportAlarmJobInterfaceTest() = default;
private Q_SLOTS:
void exportAlarmConfigTest1();
void exportAlarmConfig();
void exportAlarmConfig_data();
};
#endif // ExportAlarmJobInterfaceTest_H
......@@ -51,13 +51,20 @@ ExportCalendarsJobInterfaceTest::ExportCalendarsJobInterfaceTest(QObject *parent
{
}
void ExportCalendarsJobInterfaceTest::exportCalendarConfigTest1()
void ExportCalendarsJobInterfaceTest::exportCalendarConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportCalendarsJobInterfaceTest::exportCalendarConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
ExportCalendarsJobInterfaceTestImpl *impl = new ExportCalendarsJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->setPathConfig(configpath);
ExportCalendarsJobInterfaceTestImpl *exportNote = new ExportCalendarsJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete impl;
delete exportNote;
}
......@@ -43,7 +43,8 @@ public:
explicit ExportCalendarsJobInterfaceTest(QObject *parent = nullptr);
~ExportCalendarsJobInterfaceTest() = default;
private Q_SLOTS:
void exportCalendarConfigTest1();
void exportCalendarConfig_data();
void exportCalendarConfig();
};
#endif // EXPORTCALENDARSJOBINTERFACETEST_H
......@@ -74,14 +74,20 @@ ExportMailJobInterfaceTest::ExportMailJobInterfaceTest(QObject *parent)
{
}
void ExportMailJobInterfaceTest::exportMailConfigTest1()
void ExportMailJobInterfaceTest::exportMailConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportMailJobInterfaceTest::exportMailConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
ExportMailJobInterfaceTestImpl *impl = new ExportMailJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->setPathConfig(configpath);
ExportMailJobInterfaceTestImpl *exportNote = new ExportMailJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete impl;
delete exportNote;
}
......@@ -51,7 +51,8 @@ public:
explicit ExportMailJobInterfaceTest(QObject *parent = nullptr);
~ExportMailJobInterfaceTest() = default;
private Q_SLOTS:
void exportMailConfigTest1();
void exportMailConfig();
void exportMailConfig_data();
};
#endif // EXPORTMAILJOBINTERFACETEST_H
......@@ -58,11 +58,18 @@ ExportNotesJobInterfaceTest::ExportNotesJobInterfaceTest(QObject *parent)
{
}
void ExportNotesJobInterfaceTest::exportNoteConfigTest1()
void ExportNotesJobInterfaceTest::exportNoteConfig_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/test1/");
QTest::newRow("test1") << pathConfig;
}
void ExportNotesJobInterfaceTest::exportNoteConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
const QByteArray pathConfig("/export/test1/");
file->setPathConfig(QByteArray(PIMDATAEXPORTER_DIR) + pathConfig);
file->setPathConfig(configpath);
ExportNotesJobInterfaceTestImpl *exportNote = new ExportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
......
......@@ -44,7 +44,8 @@ public:
explicit ExportNotesJobInterfaceTest(QObject *parent = nullptr);
~ExportNotesJobInterfaceTest() = default;
private Q_SLOTS:
void exportNoteConfigTest1();
void exportNoteConfig_data();
void exportNoteConfig();
};
#endif // EXPORTNOTESJOBINTERFACETEST_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