logsui/logsapp/tsrc/ut_logsapp/src/ut_logsservicehandler.cpp
changeset 11 64a47b97e1e1
parent 6 41c0a814d878
child 9 68f3171a5819
equal deleted inserted replaced
10:b04270301d3b 11:64a47b97e1e1
    87 }
    87 }
    88 
    88 
    89 void UT_LogsServiceHandler::testStart()
    89 void UT_LogsServiceHandler::testStart()
    90 {
    90 {
    91     qRegisterMetaType< LogsServices::LogsView >("LogsServices::LogsView");
    91     qRegisterMetaType< LogsServices::LogsView >("LogsServices::LogsView");
    92     QSignalSpy spy(mServiceOld, SIGNAL(activateView(LogsServices::LogsView, bool)));
    92     QSignalSpy spy(mServiceOld, SIGNAL(activateView(LogsServices::LogsView, bool, QString)));
    93      
    93      
    94     // Wrong view
    94     // Wrong view
    95     QVERIFY( mServiceOld->start( 9999, true ) != 0 );
    95     QVERIFY( mServiceOld->start( 9999, true ) != 0 );
    96     QVERIFY( spy.count() == 0 );
    96     QVERIFY( spy.count() == 0 );
    97 
    97 
   119 }
   119 }
   120 
   120 
   121 void UT_LogsServiceHandler::testShow()
   121 void UT_LogsServiceHandler::testShow()
   122 {
   122 {
   123     qRegisterMetaType< LogsServices::LogsView >("LogsServices::LogsView");
   123     qRegisterMetaType< LogsServices::LogsView >("LogsServices::LogsView");
   124     QSignalSpy spy(mService, SIGNAL(activateView(LogsServices::LogsView, bool)));
   124     QSignalSpy spy(mService, SIGNAL(activateView(LogsServices::LogsView, bool, QString)));
   125     QSignalSpy spy2(mService, SIGNAL(activateView(QString)));
   125     QSignalSpy spy2(mService, SIGNAL(activateView(QString)));
   126     QVariantMap map;
   126     QVariantMap map;
   127 
   127 
   128     // Wrong view
   128     // Wrong view
   129     map.insert(logsViewIndexParam, QVariant(9999));
   129     map.insert(logsViewIndexParam, QVariant(9999));