50b3deafccfc0b0edd284ff720c94644d61fecef
[profile/ivi/ofono-qt.git] / tests / test_ofonomodemmanager.cpp
1 #include <QtTest/QtTest>
2 #include <QtCore/QObject>
3
4 #include <ofonomodemmanager.h>
5
6 #include <QtDebug>
7
8
9 class TestOfonoModemManager : public QObject
10 {
11     Q_OBJECT
12
13 private slots:
14     void modemAdded(QString modem)
15     {
16     qDebug() << "Modem added" << modem;
17     }
18
19     void modemRemoved(QString modem)
20     {
21     qDebug() << "Modem removed" << modem;
22     }
23
24     void initTestCase()
25     {
26         mm = new OfonoModemManager(this);
27         connect(mm, SIGNAL(modemAdded(QString)), this, SLOT(modemAdded(QString)));
28         connect(mm, SIGNAL(modemRemoved(QString)), this, SLOT(modemRemoved(QString)));
29     }
30
31     void testOfonoModemManager()
32     {
33     qDebug() << mm->modems();
34     QTest::qWait(30000);
35     }
36
37
38     void cleanupTestCase()
39     {
40
41     }
42
43
44 private:
45     OfonoModemManager *mm;
46 };
47
48 QTEST_MAIN(TestOfonoModemManager)
49 #include "test_ofonomodemmanager.moc"