1 /*************************************************************************** 2 * Copyright (c) 2009 Sven Krohlas <sven@asbest-online.de> * 3 * * 4 * This program is free software; you can redistribute it and/or modify * 5 * it under the terms of the GNU General Public License as published by * 6 * the Free Software Foundation; either version 2 of the License, or * 7 * (at your option) any later version. * 8 * * 9 * This program is distributed in the hope that it will be useful, * 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 * GNU General Public License for more details. * 13 * * 14 * You should have received a copy of the GNU General Public License * 15 * along with this program; if not, write to the * 16 * Free Software Foundation, Inc., * 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 18 ***************************************************************************/ 19 20 #ifndef TESTXSPFPLAYLIST_H 21 #define TESTXSPFPLAYLIST_H 22 23 #include <QObject> 24 #include <QString> 25 26 class QTemporaryDir; 27 28 namespace Playlists { 29 class XSPFPlaylist; 30 } 31 32 class TestXSPFPlaylist : public QObject 33 { 34 Q_OBJECT 35 36 public: 37 TestXSPFPlaylist(); 38 39 private Q_SLOTS: 40 void initTestCase(); 41 void cleanupTestCase(); 42 43 void testSetAndGetName(); 44 void prettyName(); 45 void testSetAndGetTracks(); 46 void testSetAndGetTitle(); 47 void testSetAndGetCreator(); 48 void testSetAndGetAnnotation(); 49 void testSetAndGetInfo(); 50 void testSetAndGetLocation(); 51 void testSetAndGetIdentifier(); 52 void testSetAndGetImage(); 53 void testSetAndGetDate(); 54 void testSetAndGetLicense(); 55 void testSetAndGetAttribution(); 56 void testSetAndGetLink(); 57 void testUidUrl(); 58 void testIsWritable(); 59 void testSave(); 60 61 private: 62 Playlists::XSPFPlaylist *m_testPlaylist1; 63 QTemporaryDir *m_tempDir; 64 QString dataPath( const QString &relPath ); 65 }; 66 67 #endif // TESTXSPFPLAYLIST_H 68