2 * This file is part of ofono-qt
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * Contact: Alexander Kanavin <alexander.kanavin@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #include <QtTest/QtTest>
25 #include <QtCore/QObject>
27 #include <ofonomessagewaiting.h>
31 class TestOfonoMessageWaiting : public QObject
37 void voicemailWaitingChanged(bool waiting)
39 qDebug() << "voicemailWaitingChanged" << waiting;
42 void voicemailMessageCountChanged(int count)
44 qDebug() << "voicemailMessageCountChanged" << count;
47 void voicemailMailboxNumberChanged(QString mailboxnumber)
49 qDebug() << "voicemailMailboxNumberChanged" << mailboxnumber;
52 void validityChanged(bool validity)
54 qDebug() << "ValidityChanged" << validity;
59 m = new OfonoMessageWaiting(QString(), this);
60 connect(m, SIGNAL(validityChanged(bool)), this,
61 SLOT(validityChanged(bool)));
62 connect(m, SIGNAL(voicemailWaitingChanged(bool)), this,
63 SLOT(voicemailWaitingChanged(bool)));
64 connect(m, SIGNAL(voicemailMessageCountChanged(int)), this,
65 SLOT(voicemailMessageCountChanged(int)));
66 connect(m, SIGNAL(voicemailMailboxNumberChanged(QString)), this,
67 SLOT(voicemailMailboxNumberChanged(QString)));
70 void testOfonoMessageWaiting()
72 qDebug() << "validity:" << m->isValid();
73 qDebug() << "voicemailWaiting():" << m->voicemailWaiting();
74 qDebug() << "voicemailMessageCount():" << m->voicemailMessageCount();
75 qDebug() << "voicemailMailboxNumber():" << m->voicemailMailboxNumber();
80 void cleanupTestCase()
87 OfonoMessageWaiting *m;
90 QTEST_MAIN(TestOfonoMessageWaiting)
91 #include "test_ofonomessagewaiting.moc"