mpviewplugins/mpdetailsviewplugin/tsrc/unittest_mpdetailsview/src/unittest_mpdetailsview.cpp
changeset 45 612c4815aebe
parent 36 a0afa279b8fe
child 47 4cc1412daed0
equal deleted inserted replaced
43:0f32e550d9d8 45:612c4815aebe
    53 // Do this so we can access all member variables.
    53 // Do this so we can access all member variables.
    54 #define private public
    54 #define private public
    55 #include "mpdetailsview.h"
    55 #include "mpdetailsview.h"
    56 #undef private
    56 #undef private
    57 
    57 
    58 
    58 // This so we can test private functions
       
    59 #include "../../src/mpdetailsview.cpp"
       
    60 
       
    61 #include "../moc_mpdetailsview.cpp"
    59 
    62 
    60 /*!
    63 /*!
    61  Make our test case a stand-alone executable that runs all the test functions.
    64  Make our test case a stand-alone executable that runs all the test functions.
    62  */
    65  */
    63 int main(int argc, char *argv[])
    66 int main(int argc, char *argv[])
   248     mTest->mSongData->mAlbum = QString("");
   251     mTest->mSongData->mAlbum = QString("");
   249     mTest->mSongData->mArtist = QString("");
   252     mTest->mSongData->mArtist = QString("");
   250     mTest->handlePlaybackInfoChanged();
   253     mTest->handlePlaybackInfoChanged();
   251     QVERIFY( mTest->mInspireMeQueryRendered == true );
   254     QVERIFY( mTest->mInspireMeQueryRendered == true );
   252     QVERIFY( mTest->mSongData->link().isEmpty() == true );
   255     QVERIFY( mTest->mSongData->link().isEmpty() == true );
   253     QCOMPARE( mTest->mAlbumText->plainText(), QString( "Unknown" ) );
   256     QCOMPARE( mTest->mAlbumText->plainText(), QString( "txt_mus_other_unknown7" ) );
   254     QCOMPARE( mTest->mArtistText->plainText(), QString( "Unknown" ) );
   257     QCOMPARE( mTest->mArtistText->plainText(), QString( "txt_mus_other_unknown6" ) );
   255 }
   258 }
   256 
   259 
   257 void TestMpDetailsView::testClearInspireMe()
   260 void TestMpDetailsView::testClearInspireMe()
   258 {
   261 {
   259     mTest->clearInspireMe();
   262     mTest->clearInspireMe();