56 void test_setCallHeaderTexts2Lines_waiting(); |
56 void test_setCallHeaderTexts2Lines_waiting(); |
57 void test_setCallHeaderTexts2Lines_alerttodisconnected(); |
57 void test_setCallHeaderTexts2Lines_alerttodisconnected(); |
58 void test_setCallHeaderTexts2Lines_active(); |
58 void test_setCallHeaderTexts2Lines_active(); |
59 void test_setCallHeaderTexts2Lines_held(); |
59 void test_setCallHeaderTexts2Lines_held(); |
60 void test_setCallHeaderTexts2Lines_disconnected(); |
60 void test_setCallHeaderTexts2Lines_disconnected(); |
|
61 void test_setCallHeaderTexts2Lines_outgoing(); |
61 |
62 |
62 void test_compareHeaders(); |
63 void test_compareHeaders(); |
63 |
64 |
64 void test_stylePluginNameWithPath(); |
65 void test_stylePluginNameWithPath(); |
65 |
66 |
462 QVERIFY( opt.mText1 == "john" ); |
463 QVERIFY( opt.mText1 == "john" ); |
463 QVERIFY( opt.mText1Clip == Qt::ElideRight ); |
464 QVERIFY( opt.mText1Clip == Qt::ElideRight ); |
464 QVERIFY( opt.mText2 == "discon" ); |
465 QVERIFY( opt.mText2 == "discon" ); |
465 QVERIFY( opt.mText2Clip == Qt::ElideRight ); |
466 QVERIFY( opt.mText2Clip == Qt::ElideRight ); |
466 QVERIFY( opt.mText3 == "" ); |
467 QVERIFY( opt.mText3 == "" ); |
|
468 } |
|
469 |
|
470 void ut_BubbleUtils::test_setCallHeaderTexts2Lines_outgoing() |
|
471 { |
|
472 // outgoing |
|
473 BubbleHeader header; |
|
474 BubbleStyleOption opt; |
|
475 |
|
476 header.setCallState(BubbleManager::Outgoing); |
|
477 header.setCli("john", Qt::ElideRight); |
|
478 header.setText("calling", Qt::ElideRight); |
|
479 header.setTimerCost("00:00"); |
|
480 |
|
481 BubbleUtils::setCallHeaderTexts2Lines(header, opt); |
|
482 QCOMPARE(opt.mText1, QString("calling")); |
|
483 QCOMPARE(opt.mText1Clip, Qt::ElideRight); |
|
484 QCOMPARE(opt.mText2, QString("john")); |
|
485 QCOMPARE(opt.mText2Clip, Qt::ElideRight); |
467 } |
486 } |
468 |
487 |
469 void ut_BubbleUtils::test_compareHeaders() |
488 void ut_BubbleUtils::test_compareHeaders() |
470 { |
489 { |
471 BubbleHeader header1; |
490 BubbleHeader header1; |