File indexing completed on 2024-04-28 15:22:17

0001 /*
0002  * TagLibExtractor tests.
0003  *
0004  * SPDX-FileCopyrightText: 2015 Juan Palacios <jpalaciosdev@gmail.com>
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-or-later
0007  *
0008  */
0009 
0010 #ifndef TAGLIBEXTRACTORTEST_H
0011 #define TAGLIBEXTRACTORTEST_H
0012 
0013 #include <QObject>
0014 #include <QMimeDatabase>
0015 #include "properties.h"
0016 
0017 class TagLibExtractorTest : public QObject
0018 {
0019     Q_OBJECT
0020 private:
0021     QString testFilePath(const QString& fileName) const;
0022 
0023 private Q_SLOTS:
0024     void initTestCase();
0025     void testNoExtraction();
0026     void testPropertyTypes();
0027     void testCommonData();
0028     void testCommonData_data();
0029     void testVorbisComment();
0030     void testVorbisComment_data();
0031     void testVorbisCommentMultivalue();
0032     void testVorbisCommentMultivalue_data();
0033     void testId3();
0034     void testId3_data();
0035     void testApe();
0036     void testApe_data();
0037     void testMp4();
0038     void testMp4_data();
0039     void testAax();
0040     void testAax_data();
0041     void testAsf();
0042     void testAsf_data();
0043     void testId3Rating_data();
0044     void testId3Rating();
0045     void testWmaRating_data();
0046     void testWmaRating();
0047     void testNoMetadata();
0048     void testNoMetadata_data();
0049     void testRobustness();
0050     void testRobustness_data();
0051     void testImageData();
0052     void testImageData_data();
0053 
0054 private:
0055     // Convenience function
0056     const QStringList propertyEnumNames(const QList<KFileMetaData::Property::Property>& key) const;
0057     QMimeDatabase mimeDb;
0058     QByteArray m_coverImage;
0059 };
0060 
0061 #endif // TAGLIBEXTRACTORTEST_H