Warning, file /utilities/ark/autotests/testhelper/abstractaddtest.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2016 Vladyslav Batyrenko <mvlabat@gmail.com> 0003 SPDX-FileCopyrightText: 2016 Elvis Angelaccio <elvis.angelaccio@kde.org> 0004 0005 SPDX-License-Identifier: BSD-2-Clause 0006 */ 0007 0008 #ifndef ABSTRACTADDTEST_H 0009 #define ABSTRACTADDTEST_H 0010 0011 #include "archive_kerfuffle.h" 0012 #include "pluginmanager.h" 0013 0014 /** 0015 * Base class for tests about Add/Copy/Move jobs. 0016 * Make sure to call the constructor in order to load the plugins. 0017 */ 0018 class AbstractAddTest : public QObject 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 static QStringList getEntryPaths(Kerfuffle::Archive *archive); 0024 0025 /** 0026 * Setup test cases for each format and for each plugin. 0027 * @param testName Name of the test case shown in the debug output 0028 * @param archiveName Archive name. The extension of the tested formats will be appended to it. 0029 * @param targetEntries Entries passed to the job. 0030 * @param destination Destination entry passed to the job. 0031 * @param expectedNewPaths New expected paths that the job should create. 0032 * @param numberOfEntries Number of entries in the archive expected after the job ends. 0033 */ 0034 void setupRows(const QString &testName, 0035 const QString &archiveName, 0036 const QVector<Kerfuffle::Archive::Entry *> &targetEntries, 0037 Kerfuffle::Archive::Entry *destination, 0038 const QStringList &expectedNewPaths, 0039 uint numberOfEntries) const; 0040 0041 protected: 0042 Kerfuffle::PluginManager m_pluginManager; 0043 }; 0044 0045 #endif // ABSTRACTADDTEST_H