1 #include <QtTest/QtTest>
2 #include <QtCore/QObject>
4 #include <ofonomessagewaiting.h>
8 class TestOfonoMessageWaiting : public QObject
14 void voicemailWaitingChanged(bool waiting)
16 qDebug() << "voicemailWaitingChanged" << waiting;
19 void voicemailMessageCountChanged(int count)
21 qDebug() << "voicemailMessageCountChanged" << count;
24 void voicemailMailboxNumberChanged(QString mailboxnumber)
26 qDebug() << "voicemailMailboxNumberChanged" << mailboxnumber;
29 void validityChanged(bool validity)
31 qDebug() << "ValidityChanged" << validity;
36 m = new OfonoMessageWaiting(QString(), this);
37 connect(m, SIGNAL(validityChanged(bool)), this,
38 SLOT(validityChanged(bool)));
39 connect(m, SIGNAL(voicemailWaitingChanged(bool)), this,
40 SLOT(voicemailWaitingChanged(bool)));
41 connect(m, SIGNAL(voicemailMessageCountChanged(int)), this,
42 SLOT(voicemailMessageCountChanged(int)));
43 connect(m, SIGNAL(voicemailMailboxNumberChanged(QString)), this,
44 SLOT(voicemailMailboxNumberChanged(QString)));
47 void testOfonoMessageWaiting()
49 qDebug() << "validity:" << m->isValid();
50 qDebug() << "voicemailWaiting():" << m->voicemailWaiting();
51 qDebug() << "voicemailMessageCount():" << m->voicemailMessageCount();
52 qDebug() << "voicemailMailboxNumber():" << m->voicemailMailboxNumber();
57 void cleanupTestCase()
64 OfonoMessageWaiting *m;
67 QTEST_MAIN(TestOfonoMessageWaiting)
68 #include "test_ofonomessagewaiting.moc"