mpviewplugins/mpdetailsviewplugin/tsrc/unittest_mpmpxdetailsframeworkwrapper/inc/unittest_mpmpxdetailsframeworkwrapper.h
branchGCC_SURGE
changeset 44 eff9df3d9c98
parent 30 b95ddb5a0d10
parent 42 79c49924ae23
equal deleted inserted replaced
30:b95ddb5a0d10 44:eff9df3d9c98
     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 mpmpxdetailsframeworkwrapper
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TESTMPMPXDETAILSFRAMEWORKWRAPPER_H
       
    19 #define TESTMPMPXDETAILSFRAMEWORKWRAPPER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 
       
    23 class MpMpxDetailsFrameworkWrapper;
       
    24 class MpMpxDetailsFrameworkWrapperPrivate;
       
    25 class CMPXMedia;
       
    26 class MpSongData;
       
    27 
       
    28 class TestMpMpxDetailsFrameworkWrapper : public QObject
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33 
       
    34     TestMpMpxDetailsFrameworkWrapper();
       
    35     virtual ~TestMpMpxDetailsFrameworkWrapper();
       
    36     
       
    37 private:     //test utility functions
       
    38     void loadTestData(TInt aPos);
       
    39     void verifyEmptyTestData();
       
    40     void verify(int index);
       
    41     void handleSongDetailInfoChanged();
       
    42     void doTestHandleMedia(int index, TInt aResult);
       
    43     
       
    44 private slots:
       
    45 
       
    46     void initTestCase();
       
    47     void cleanupTestCase();
       
    48     void init();
       
    49     void cleanup();
       
    50 
       
    51 private slots: // test functions
       
    52     void testConstructor();
       
    53     void testSongData();
       
    54     void testHandlePlaybackMessage();
       
    55     void testHandleMedia();        
       
    56     void testRetrieveSong();
       
    57     void testHandleProperty();
       
    58     void testHandleSubPlayerNames();
       
    59 
       
    60 private:
       
    61 
       
    62     MpMpxDetailsFrameworkWrapper           *mTest;
       
    63     MpMpxDetailsFrameworkWrapperPrivate    *mTestPrivate;
       
    64     CMPXMedia                              *iMediaTestData;
       
    65     bool                                   mSongDetailInfoChanged;
       
    66     TInt mAllocCells;
       
    67 
       
    68 };
       
    69 
       
    70 #endif  // TESTMPMPXDETAILSFRAMEWORKWRAPPER_H
       
    71 
       
    72 
       
    73 
       
    74