File indexing completed on 2024-05-19 15:46:09
0001 /* 0002 This file was inspired by KDevelop's git plugin 0003 SPDX-FileCopyrightText: 2008 Evgeniy Ivanov <powerfox@kde.ru> 0004 0005 Adapted for Perforce 0006 SPDX-FileCopyrightText: 2011 Morten Danielsen Volden <mvolden2@gmail.com> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #ifndef PERFORCEPLUGIN_TEST_H 0012 #define PERFORCEPLUGIN_TEST_H 0013 0014 #include <QObject> 0015 #include <QString> 0016 0017 class PerforcePlugin; 0018 0019 class PerforcePluginTest : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 PerforcePluginTest(); 0024 0025 private Q_SLOTS: 0026 void initTestCase(); 0027 void cleanupTestCase(); 0028 void init(); 0029 void cleanup(); 0030 0031 void testAdd(); 0032 void testEdit(); 0033 void testEditMultipleFiles(); 0034 void testStatus(); 0035 void testAnnotate(); 0036 void testHistory(); 0037 void testRevert(); 0038 void testUpdateFile(); 0039 void testUpdateDir(); 0040 void testCommit(); 0041 void testDiff(); 0042 private: 0043 void removeTempDirsIfAny(); 0044 void createNewTempDirs(); 0045 0046 PerforcePlugin* m_plugin = nullptr; 0047 0048 const QString tempDir; 0049 const QString perforceTestBaseDirNoSlash; 0050 const QString perforceTestBaseDir; 0051 const QString perforceConfigFileName; 0052 0053 const QString perforceSrcDir; 0054 const QString perforceTest_FileName; 0055 const QString perforceTest_FileName2; 0056 const QString perforceTest_FileName3; 0057 }; 0058 0059 #endif