videocollection/videocollectionview/tsrc/testvideocollectionuiloader/inc/testvideocollectionuiloader.h
changeset 36 8aed59de29f9
equal deleted inserted replaced
35:3738fe97f027 36:8aed59de29f9
       
     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: tester for methods in VideoCollectionUiLoader
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef TESTVIDEOCOLLECTIONUILOADER_H
       
    19 #define TESTVIDEOCOLLECTIONUILOADER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <qttest/qttest>
       
    23 
       
    24 // FORWARD DECLARATIONS
       
    25 class VideoCollectionUiLoader;
       
    26 
       
    27 class TestVideoCollectionUiLoader : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32     TestVideoCollectionUiLoader();
       
    33     virtual ~TestVideoCollectionUiLoader();
       
    34     
       
    35 private slots: // test functions for the test framework
       
    36     void init();
       
    37     void cleanup();
       
    38     
       
    39     /** addData testcase */
       
    40     void testAddData();
       
    41     
       
    42     /** findWidget testcase */
       
    43     void testFindWidget();
       
    44     
       
    45     /** findObject testcase */
       
    46     void testFindObject();
       
    47         
       
    48     /** setIsServce testcase */
       
    49     void testIsService();
       
    50         
       
    51     /** loadDocml testcase */
       
    52     void testLoadDocml();
       
    53         
       
    54     /** loadSection testcase */
       
    55     void testLoadSection();
       
    56         
       
    57     /** loadPhase testcase */
       
    58     void testLoadPhase();
       
    59     
       
    60     /** loadPhase testcase */
       
    61     void testLoadPhase_2();
       
    62     
       
    63     /** delete loaded items testcase*/
       
    64     void testDelete();
       
    65     
       
    66     /** removeOrphanFromList testcase */
       
    67     void testRemoveOrphanFromList();    
       
    68     
       
    69     /** prepareDocmlAndSection testcase */
       
    70     void testPrepareDocmlAndSection();
       
    71     
       
    72 private slots:
       
    73     /** slot which is called when object is ready */
       
    74     void handleObjectReady(QObject *object, const QString &name);
       
    75 
       
    76 signals:
       
    77 
       
    78     void testSignal(QObject *object);
       
    79     
       
    80 private:
       
    81     /** class under test */
       
    82     VideoCollectionUiLoader *mTestObject;
       
    83     
       
    84     /** objects initialized */
       
    85     QHash<QString, QObject*> mObjects;
       
    86 };
       
    87 
       
    88 #endif//TESTVIDEOCOLLECTIONUILOADER_H