File indexing completed on 2024-05-12 04:39:06

0001 /*
0002     This file was partly taken from KDevelop's cvs plugin
0003     SPDX-FileCopyrightText: 2007 Robert Gruber <rgruber@users.sourceforge.net>
0004 
0005     Adapted for Git
0006     SPDX-FileCopyrightText: 2008 Evgeniy Ivanov <powerfox@kde.ru>
0007 
0008     Adapted for Bazaar
0009     SPDX-FileCopyrightText: 2014 Maciej Poleski
0010 
0011     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0012 */
0013 
0014 #ifndef KDEVPLATFORM_PLUGIN_TEST_BAZAAR_H
0015 #define KDEVPLATFORM_PLUGIN_TEST_BAZAAR_H
0016 
0017 #include <QObject>
0018 #include <QString>
0019 
0020 class BazaarPlugin;
0021 
0022 namespace KDevelop
0023 {
0024     class TestCore;
0025 }
0026 
0027 class TestBazaar: public QObject
0028 {
0029     Q_OBJECT
0030 public:
0031     TestBazaar();
0032 
0033 private:
0034     void repoInit();
0035     void addFiles();
0036     void prepareWhoamiInformations();
0037     void commitFiles();
0038 
0039 private Q_SLOTS:
0040     void initTestCase();
0041     void cleanupTestCase();
0042     void init();
0043     void cleanup();
0044 
0045     void testInit();
0046     void testAdd();
0047     void testCommit();
0048     void testAnnotation();
0049     void testRemoveEmptyFolder();
0050     void testRemoveEmptyFolderInFolder();
0051     void testRemoveUnindexedFile();
0052     void testRemoveFolderContainingUnversionedFiles();
0053 
0054 private:
0055     void removeTempDirs();
0056 
0057     BazaarPlugin* m_plugin = nullptr;
0058 
0059     const QString tempDir;
0060     const QString bazaarTest_BaseDir;
0061     const QString bazaarRepo;
0062     const QString bazaarSrcDir;
0063     const QString bazaarTest_FileName;
0064     const QString bazaarTest_FileName2;
0065     const QString bazaarTest_FileName3;
0066 };
0067 
0068 #endif // KDEVPLATFORM_PLUGIN_TEST_BAZAAR_H