Stellarium 0.15.2
testStelFileMgr.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2009 Matthew Gates
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _TESTSTELFILEMGR_HPP_
21 #define _TESTSTELFILEMGR_HPP_
22 
23 #include <QObject>
24 #include <QString>
25 #include <QStringList>
26 #include <QTest>
27 #include <QTemporaryDir>
28 
29 class StelFileMgr;
30 
31 class TestStelFileMgr : public QObject
32 {
33 Q_OBJECT
34 private slots:
35  void initTestCase();
36 
37  void testFindFileVanilla();
38  void testFindFileVanillaAbs();
39  void testFindFileFile();
40  void testFindFileFileAbs();
41  void testFindFileDir();
42  void testFindFileDirAbs();
43  void testFindFileNew();
44  void testFindFileNewAbs();
45  void testListContentsVanilla();
46  void testListContentsVanillaAbs();
47  void testListContentsFile();
48  void testListContentsFileAbs();
49  void testListContentsDir();
50  void testListContentsDirAbs();
51 
52 private:
53  QTemporaryDir tempDir;
54  QString workingDir;
55  QString partialPath1;
56  QString partialPath2;
57  QStringList testDirs;
58  QStringList testFiles;
59 };
60 
61 #endif // _TESTSTELFILEMGR_HPP_
62 
Provides utilities for locating and handling files.
Definition: StelFileMgr.hpp:42