videoplayerapp/videoplayerengine/tsrc/testvideoplayerengine/inc/testvideoplayerengine.h
changeset 52 e3cecb93e76a
parent 46 adbe7d5ba2f5
child 58 d2b028fd1f7d
equal deleted inserted replaced
47:45e72b57a2fd 52:e3cecb93e76a
    21 //
    21 //
    22 //      missing test functions:
    22 //      missing test functions:
    23 //      - how to setup construction to fail for testing purposes
    23 //      - how to setup construction to fail for testing purposes
    24 
    24 
    25 
    25 
    26 // Version : %version: 8 %
    26 // Version : %version: da1mmcf#9 %
    27 
    27 
    28 #ifndef __TESTVIDEOPLAYERENGINE_H__
    28 #ifndef __TESTVIDEOPLAYERENGINE_H__
    29 #define __TESTVIDEOPLAYERENGINE_H__
    29 #define __TESTVIDEOPLAYERENGINE_H__
    30 
    30 
    31 
    31 
    32 // INCLUDES
    32 // INCLUDES
    33 #include <QtTest/QtTest>
    33 #include <QtTest/QtTest>
    34 #include <qpointer.h>
    34 #include <qpointer.h>
    35 
    35 
    36 class MpxViewPlugin;
    36 class MpxViewPlugin;
    37 class QMpxVideoPlaybackWrapper;
    37 class VideoPlaybackWrapper;
    38 class QVideoPlayerEngine;
    38 class VideoPlayerEngine;
    39 class VideoServices;
    39 class VideoServices;
    40 
    40 
    41 class TestVideoPlayerEngine : public QObject
    41 class TestVideoPlayerEngine : public QObject
    42 	{
    42 {
    43 
    43 
    44     Q_OBJECT
    44     Q_OBJECT
    45 
    45 
    46 public: // Constructor / destructor
    46     public: 
    47 
    47 
    48     /**
    48         /**
    49      * Contructor.
    49          * Contructor.
    50      *
    50          *
    51      */
    51          */
    52 	TestVideoPlayerEngine();
    52         TestVideoPlayerEngine();
    53 
    53 
    54     /**
    54         /**
    55      * Destructor.
    55          * Destructor.
    56      *
    56          *
    57      */
    57          */
    58     virtual ~TestVideoPlayerEngine();
    58         virtual ~TestVideoPlayerEngine();
    59 
    59 
    60 private slots:
    60     private slots:
    61 
    61 
    62     void init(bool isService = false);
    62         void init(bool isService = false);
    63     void cleanup();
    63         void cleanup();
    64 
    64 
    65     void testCreateDelete();
    65         void testCreateDelete();
    66     void testCreateDeleteService();
    66         void testCreateDeleteService();
    67 
    67 
    68     void testInitialize();
    68         void testInitialize();
    69     void testInitializeService();
    69         void testInitializeService();
    70     
    70     
    71     void testMultipleInitialize();
    71         void testMultipleInitialize();
    72     void testMultipleInitializeService();
    72         void testMultipleInitializeService();
    73 
    73 
    74     void testHandleCommandPreInit();
    74         void testHandleCommandPreInit();
    75     void testHandleCommandPostInit();
    75         void testHandleCommandPostInit();
    76     void testHandleCommandPreAndPostInit();
    76         void testHandleCommandPreAndPostInit();
    77 
    77 
    78     void testHandleCommandPluginFail();
    78         void testHandleCommandPluginFail();
    79     void testHandleCommandPluginFail1();
    79         void testHandleCommandPluginFail1();
    80     void testHandleCommandPluginFail2();
    80         void testHandleCommandPluginFail2();
    81     
    81     
    82     void testPlayMedia();
    82         void testPlayMedia();
    83     void testSetEmbedded();
    83         void testSetEmbedded();
    84     
    84     
    85     void testInitWithActivityData();
    85         void testInitWithActivityData();
    86     void testHandleQuitWihtActivityData();
    86         void testHandleQuitWihtActivityData();
    87 
    87 
    88     // called after last test case executed
    88         // called after last test case executed
    89     void cleanupTestCase();
    89         void cleanupTestCase();
    90 
    90 
    91 signals:
    91     signals:
    92 
    92 
    93     void aboutToQuit();
    93         void aboutToQuit();
    94     void command( int );
    94         void command( int );
    95 
    95 
    96 private:
    96     private:
    97 
    97 
    98     QPointer<QVideoPlayerEngine>  mTestObject;
    98         QPointer<VideoPlayerEngine>  mTestObject;
    99 
    99 
   100     MpxViewPlugin*            mCurrentViewPlugin;
   100         MpxViewPlugin*            mCurrentViewPlugin;
   101     MpxViewPlugin*            mPlaybackViewPlugin;
   101         MpxViewPlugin*            mPlaybackViewPlugin;
   102     MpxViewPlugin*            mCollectionViewPlugin;
   102         MpxViewPlugin*            mCollectionViewPlugin;
   103     MpxViewPlugin*            mFileDetailsViewPlugin;
   103         MpxViewPlugin*            mFileDetailsViewPlugin;
   104 
   104 
   105     VideoServices*            mVideoServices;
   105         VideoServices*            mVideoServices;
   106     
   106     
   107     QMpxVideoPlaybackWrapper *mPlaybackWrapper;
   107         VideoPlaybackWrapper      *mPlaybackWrapper;
   108 
   108 
   109 };
   109 };
   110 
   110 
   111 #endif  // __TESTVIDEOPLAYERENGINE_H__
   111 #endif  // __TESTVIDEOPLAYERENGINE_H__
   112 
   112