35
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Unit test for mpsongdata
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef UNITTEST_MPSONGDATA_H_
|
|
19 |
#define UNITTEST_MPSONGDATA_H_
|
|
20 |
|
|
21 |
#include <QtTest/QtTest>
|
|
22 |
|
|
23 |
class MpSongData;
|
43
|
24 |
class MpSongDataPrivate;
|
35
|
25 |
|
|
26 |
class TestMpSongData : public QObject
|
|
27 |
{
|
|
28 |
Q_OBJECT
|
|
29 |
|
|
30 |
public:
|
|
31 |
|
|
32 |
TestMpSongData();
|
|
33 |
virtual ~TestMpSongData();
|
|
34 |
|
|
35 |
signals:
|
|
36 |
|
|
37 |
void thumbnailReady( const QPixmap& pixmap, void *data, int id, int error );
|
|
38 |
|
|
39 |
public slots:
|
|
40 |
void initTestCase();
|
|
41 |
void cleanupTestCase();
|
|
42 |
void init();
|
|
43 |
void cleanup();
|
43
|
44 |
|
35
|
45 |
private slots:
|
|
46 |
void testMemberCleanup();
|
|
47 |
void testTitle();
|
|
48 |
void testAlbum();
|
|
49 |
void testArtist();
|
|
50 |
void testComment();
|
|
51 |
void testAlbumArt();
|
|
52 |
void testYear();
|
|
53 |
void testGenre();
|
|
54 |
void testComposer();
|
|
55 |
void testAlbumtrack();
|
|
56 |
void testLink();
|
43
|
57 |
|
35
|
58 |
void testFileName();
|
|
59 |
void testMimeType();
|
|
60 |
void testDuration();
|
|
61 |
void testBitRate();
|
|
62 |
void testSampleRate();
|
|
63 |
void testSize();
|
|
64 |
void testModified();
|
|
65 |
void testCopyright();
|
|
66 |
void testMusicURL();
|
|
67 |
void testIsDrmProtected();
|
|
68 |
|
43
|
69 |
void testSetMpxMedia();
|
|
70 |
void testSetTitle();
|
35
|
71 |
void testSetAlbum();
|
|
72 |
void testSetArtist();
|
|
73 |
void testSetComment();
|
|
74 |
void testSetYear();
|
|
75 |
void testSetGenre();
|
43
|
76 |
void testSetComposer();
|
35
|
77 |
void testSetAlbumTrack();
|
|
78 |
void testSetLink();
|
43
|
79 |
|
35
|
80 |
void testSetFileName();
|
|
81 |
void testSetMimeType();
|
|
82 |
void testSetDuration();
|
|
83 |
void testSetBitRate();
|
|
84 |
void testSetSampleRate();
|
|
85 |
void testSetSize();
|
|
86 |
void testSetModified();
|
|
87 |
void testSetCopyright();
|
|
88 |
void testSetMusicURL();
|
|
89 |
void testSetDrmProtected();
|
43
|
90 |
|
35
|
91 |
void testSetAlbumArtUri();
|
|
92 |
void testThumbnailReady();
|
43
|
93 |
|
35
|
94 |
private:
|
43
|
95 |
|
|
96 |
MpSongData *mTest;
|
|
97 |
MpSongDataPrivate *mTestPrivate;
|
|
98 |
|
35
|
99 |
};
|
|
100 |
|
|
101 |
|
|
102 |
#endif /* UNITTEST_MPSONGDATA_H_ */
|