Commit 927e83c6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix export resources too

parent 2be911fc
...@@ -44,10 +44,13 @@ void ExportNotesJobInterfaceTestImpl::convertCollectionIdsToRealPath(KConfigGrou ...@@ -44,10 +44,13 @@ void ExportNotesJobInterfaceTestImpl::convertCollectionIdsToRealPath(KConfigGrou
void ExportNotesJobInterfaceTestImpl::exportArchiveResource() void ExportNotesJobInterfaceTestImpl::exportArchiveResource()
{ {
qDebug() << " not implement yet"; qDebug() << " not implement yet";
slotNoteJobTerminated();
} }
QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResource() QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResource()
{ {
qDebug() << " QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResource()";
//TODO //TODO
return {}; return {};
} }
...@@ -55,6 +58,7 @@ QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResou ...@@ -55,6 +58,7 @@ QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResou
void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)
{ {
//TODO implement it //TODO implement it
qDebug() << " void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)" << archivePath << " url " << url << " identifier " << identifier;
} }
Akonadi::Collection::Id ExportNotesJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path) Akonadi::Collection::Id ExportNotesJobInterfaceTestImpl::convertFolderPathToCollectionId(const QString &path)
...@@ -86,3 +90,22 @@ void ExportNotesJobInterfaceTest::exportNoteConfig() ...@@ -86,3 +90,22 @@ void ExportNotesJobInterfaceTest::exportNoteConfig()
file->start(); file->start();
delete exportNote; delete exportNote;
} }
void ExportNotesJobInterfaceTest::exportNoteConfigAndResource_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/");
QTest::newRow("test1") << pathConfig + QByteArray("test1/");
QTest::newRow("full") << pathConfig + QByteArray("full/");
}
void ExportNotesJobInterfaceTest::exportNoteConfigAndResource()
{
QFETCH(QByteArray, configpath);
TestExportFile *file = new TestExportFile(this);
file->setPathConfig(configpath);
ExportNotesJobInterfaceTestImpl *exportNote = new ExportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config|Utils::StoredType::Resources}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(exportNote);
file->start();
delete exportNote;
}
...@@ -48,6 +48,9 @@ public: ...@@ -48,6 +48,9 @@ public:
private Q_SLOTS: private Q_SLOTS:
void exportNoteConfig_data(); void exportNoteConfig_data();
void exportNoteConfig(); void exportNoteConfig();
void exportNoteConfigAndResource();
void exportNoteConfigAndResource_data();
}; };
#endif // EXPORTNOTESJOBINTERFACETEST_H #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