1 /* |
|
2 * Copyright (c) 2009 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 mpnowplayingbackend |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TESTNOWPLAYINGBACKEND_H |
|
19 #define TESTNOWPLAYINGBACKEND_H |
|
20 |
|
21 #include <QtTest/QtTest> |
|
22 |
|
23 class MpNowPlayingBackEnd; |
|
24 class MpNowPlayingBackEndPrivate; |
|
25 |
|
26 class TestMpNowPlayingBackEnd : public QObject |
|
27 { |
|
28 Q_OBJECT |
|
29 |
|
30 public: |
|
31 |
|
32 TestMpNowPlayingBackEnd(); |
|
33 virtual ~TestMpNowPlayingBackEnd(); |
|
34 |
|
35 signals: |
|
36 void update(); |
|
37 void playPause(); |
|
38 |
|
39 public slots: |
|
40 void initTestCase(); |
|
41 void cleanupTestCase(); |
|
42 void init(); |
|
43 void cleanup(); |
|
44 |
|
45 private slots: |
|
46 void testConstructor(); |
|
47 void testInitUtilCreateFail(); |
|
48 void testInitAddObserverFail(); |
|
49 void testDestructor(); |
|
50 void testDestructorRemoveObserverFail(); |
|
51 void testUpdateSuccess(); |
|
52 void testUpdateNoSource(); |
|
53 void testUpdateStateFail(); |
|
54 void testUpdateMediaFail(); |
|
55 void testPlayPause(); |
|
56 void testPlayPauseFail(); |
|
57 void testHandlePlaybackMessageStateChanged(); |
|
58 void testHandlePlaybackMessageStateChangedFail(); |
|
59 void testHandlePlaybackMessagePlaylistUpdated(); |
|
60 void testHandlePlaybackMessageMediaChanged(); |
|
61 void testHandlePlaybackMessagePlayerChanged(); |
|
62 void testHandlePlaybackMessagePropertyChanged(); |
|
63 void testHandleMediaLTitle(); |
|
64 void testHandleMediaLTitleUri(); |
|
65 void testHandleMediaLUri(); |
|
66 void testHandleMediaLArtist(); |
|
67 |
|
68 private: |
|
69 |
|
70 MpNowPlayingBackEnd *mTest; |
|
71 MpNowPlayingBackEndPrivate *mTestPrivate; |
|
72 |
|
73 }; |
|
74 |
|
75 #endif // TESTNOWPLAYINGBACKEND_H |
|
76 |
|
77 |
|
78 |
|
79 |
|