mpdata/tsrc/unittest_mpcollectionalbumartmanager/inc/unittest_mpcollectionalbumartmanager.h
changeset 22 ecf06a08d4d9
child 29 8192e5b5c935
equal deleted inserted replaced
20:82baf59ce8dd 22:ecf06a08d4d9
       
     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 mpcollectionalbumartmanager
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TESTMPCOLLECTIONALBUMARTMANAGER_H
       
    19 #define TESTMPCOLLECTIONALBUMARTMANAGER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <QIcon>
       
    23 
       
    24 class MpCollectionAlbumArtManager;
       
    25 class MpMpxCollectionData;
       
    26 
       
    27 class TestMpCollectionAlbumArtManager : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32 
       
    33     TestMpCollectionAlbumArtManager();
       
    34     virtual ~TestMpCollectionAlbumArtManager();
       
    35 
       
    36 signals:
       
    37 
       
    38     void thumbnailReady( QPixmap pixmap, void *data, int id, int error );
       
    39 
       
    40 public slots:
       
    41 
       
    42     void initTestCase();
       
    43     void cleanupTestCase();
       
    44     void init();
       
    45     void cleanup();
       
    46 
       
    47 private slots:
       
    48 
       
    49     void testMemberCleanup();
       
    50     void testAlbumArtNoCache();
       
    51     void testAlbumArtNoCacheQueue();
       
    52     void testAlbumArtCache();
       
    53     void testAlbumArtNoUri();
       
    54     void testAlbumArtFail();
       
    55     void testCacheFirstScreenEmpty();
       
    56     void testCacheFirstScreen();
       
    57     void testCacheFirstScreenAllCached();
       
    58     void testCancel();
       
    59     void testThumbnailReadyCache();
       
    60     void testThumbnailReadyCacheError();
       
    61     void testThumbnailReadyAlbumArt();
       
    62     void testThumbnailReadyAlbumArtError();
       
    63 
       
    64 private:
       
    65 
       
    66     MpCollectionAlbumArtManager *mTest;
       
    67     MpMpxCollectionData         *mStubData;
       
    68     QIcon                       mIcon;
       
    69 
       
    70 };
       
    71 
       
    72 #endif  // TESTMPCOLLECTIONALBUMARTMANAGER_H
       
    73 
       
    74 
       
    75 
       
    76