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

Allow to create multi test

parent 1a39569a
Pipeline #21145 passed with stage
in 13 minutes and 2 seconds
......@@ -54,40 +54,26 @@ ExportAkregatorJobInterfaceTest::ExportAkregatorJobInterfaceTest(QObject *parent
{
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfig_data()
void ExportAkregatorJobInterfaceTest::exportAkregator_data()
{
QTest::addColumn<QByteArray>("configpath");
QTest::addColumn<Utils::StoredTypes>("options");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/");
QTest::newRow("test1") << pathConfig + QByteArray("test1/");
Utils::StoredTypes options = {Utils::StoredType::Config};
//TODO
options = {Utils::StoredType::Config | Utils::StoredType::Resources};
QTest::newRow("fullresource") << pathConfig + QByteArray("fullresource/") << options;
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfig()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
file->setPathConfig(configpath);
ExportAkregatorJobInterfaceTestImpl *exportNote = new ExportAkregatorJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete exportNote;
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfigAndResource_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/");
//QTest::newRow("test1resource") << pathConfig + QByteArray("test1resource/");
QTest::newRow("fullresource") << pathConfig + QByteArray("fullresource/");
}
void ExportAkregatorJobInterfaceTest::exportAkregatorConfigAndResource()
void ExportAkregatorJobInterfaceTest::exportAkregator()
{
QFETCH(QByteArray, configpath);
QFETCH(Utils::StoredTypes, options);
TestExportFile *file = new TestExportFile(this);
file->setPathConfig(configpath);
ExportAkregatorJobInterfaceTestImpl *exportNote = new ExportAkregatorJobInterfaceTestImpl(this, {Utils::StoredType::Config|Utils::StoredType::Resources}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
ExportAkregatorJobInterfaceTestImpl *exportAkregator = new ExportAkregatorJobInterfaceTestImpl(this, options, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportAkregator);
file->start();
delete exportNote;
delete exportAkregator;
}
......@@ -42,10 +42,8 @@ public:
explicit ExportAkregatorJobInterfaceTest(QObject *parent = nullptr);
~ExportAkregatorJobInterfaceTest() = default;
private Q_SLOTS:
void exportAkregatorConfig();
void exportAkregatorConfig_data();
void exportAkregatorConfigAndResource_data();
void exportAkregatorConfigAndResource();
void exportAkregator_data();
void exportAkregator();
};
#endif // EXPORTAKREGATORJOBINTERFACETEST_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