File indexing completed on 2024-06-09 04:46:03

0001 /***************************************************************************
0002  *   Copyright (c) 2009 Sven Krohlas <sven@asbest-online.de>               *
0003  *                                                                         *
0004  *   This program is free software; you can redistribute it and/or modify  *
0005  *   it under the terms of the GNU General Public License as published by  *
0006  *   the Free Software Foundation; either version 2 of the License, or     *
0007  *   (at your option) any later version.                                   *
0008  *                                                                         *
0009  *   This program is distributed in the hope that it will be useful,       *
0010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0012  *   GNU General Public License for more details.                          *
0013  *                                                                         *
0014  *   You should have received a copy of the GNU General Public License     *
0015  *   along with this program; if not, write to the                         *
0016  *   Free Software Foundation, Inc.,                                       *
0017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
0018  ***************************************************************************/
0019 
0020 #ifndef TESTMETAFILETRACK_H
0021 #define TESTMETAFILETRACK_H
0022 
0023 #include "core-impl/meta/file/File.h"
0024 
0025 #include <QObject>
0026 #include <QString>
0027 
0028 class QTemporaryDir;
0029 
0030 class TestMetaFileTrack : public QObject
0031 {
0032 Q_OBJECT
0033 
0034 public:
0035     TestMetaFileTrack();
0036 
0037 private Q_SLOTS:
0038     void initTestCase();
0039     void cleanupTestCase();
0040 
0041     void init();
0042 
0043     // methods inherited from Meta::Base
0044     void testNameAndSetTitle();
0045     void testPrettyName();
0046     void testSortableName();
0047 
0048     // methods inherited from Meta::Track
0049     void testPlayableUrl();
0050     void testPrettyUrl();
0051     void testUidUrl();
0052 
0053     void testIsPlayable();
0054     void testIsEditable();
0055 
0056     void testSetGetAlbum();
0057     void testSetGetArtist();
0058     void testSetGetGenre();
0059     void testSetGetComposer();
0060     void testSetGetYear();
0061     void testSetGetComment();
0062     void testSetGetScore();
0063     void testSetGetRating();
0064     void testSetGetTrackNumber();
0065     void testSetGetDiscNumber();
0066     void testLength();
0067     void testFilesize();
0068     void testSampleRate();
0069     void testBitrate();
0070     void testSetGetLastPlayed();
0071     void testSetGetFirstPlayed();
0072     void testSetGetPlayCount();
0073     void testReplayGain();
0074     void testType();
0075     void testCreateDate();
0076 
0077 private:
0078     MetaFile::TrackPtr m_track;
0079     QTemporaryDir *m_tmpDir;
0080     QString m_tmpFileName;
0081     QString m_origTrackPath;
0082 };
0083 
0084 #endif // TESTMETAFILETRACK_H