File indexing completed on 2024-05-19 16:37:10

0001 /*
0002     SPDX-FileCopyrightText: 2007 Bertjan Broeksema <b.broeksema@kdemail.net>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PACKAGETEST_H
0008 
0009 #include <QTest>
0010 
0011 #include "plasma/package.h"
0012 #include "plasma/packagestructure.h"
0013 
0014 class PlasmoidPackageTest : public QObject
0015 {
0016     Q_OBJECT
0017 
0018 public Q_SLOTS:
0019     void initTestCase();
0020     void init();
0021     void cleanup();
0022 
0023 private Q_SLOTS:
0024     void createAndInstallPackage();
0025     void isValid();
0026     void filePath();
0027     void entryList();
0028 
0029     void packageInstalled(KJob *j);
0030     void packageUninstalled(KJob *j);
0031 
0032 private:
0033     void createTestPackage(const QString &packageName);
0034 
0035     QString m_packageRoot;
0036     QString m_package;
0037     KJob *m_packageJob;
0038     Plasma::Package m_defaultPackage;
0039     Plasma::PackageStructure *m_defaultPackageStructure;
0040 };
0041 
0042 #endif