File indexing completed on 2024-03-24 17:25:10
0001 /*************************************************************************** 0002 krenamefiletest.h - description 0003 ------------------- 0004 begin : Sat Apr 20 2007 0005 copyright : (C) 2007 by Dominik Seichter 0006 email : domseichter@web.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef KRENAMEFILE_TEST_H 0019 #define KRENAMEFILE_TEST_H 0020 0021 #include <QObject> 0022 0023 #include "krenamefile.h" 0024 0025 /** This class contains KRename's selftest. 0026 * The selftest consists of several unit tests for 0027 * important classes. 0028 * 0029 * Currently covered classes: 0030 * 0031 * - KRenameFile 0032 */ 0033 class KRenameFileTest : public QObject 0034 { 0035 Q_OBJECT 0036 0037 private Q_SLOTS: 0038 void testKRenameFile(); 0039 0040 private: 0041 /** Test a KRenameFile class object for 0042 * an url if the pass is split correctly. 0043 * 0044 * \param url the url to split 0045 * \param directory the expected directory 0046 * \param filename the expected filename 0047 * \param extension the expected extension 0048 * \param eSplitMode the splitmode to use 0049 * \param dot the dot to use as splitter 0050 * \param isDir test a file or a directory 0051 */ 0052 void testKRenameFileInternal(const QUrl &url, const QString &directory, 0053 const QString &filename, const QString &extension, 0054 ESplitMode eSplitMode, int dot, bool isDir); 0055 0056 }; 0057 0058 #endif // KRENAMEFILE_TEST_H