19c76bb54c5d47e4eed9471013d83e7e557a3410
[profile/ivi/ofono-qt.git] / tests / test_ofonoradiosettings.cpp
1 #include <QtTest/QtTest>
2 #include <QtCore/QObject>
3
4 #include <ofonoradiosettings.h>
5
6 #include <QtDebug>
7
8
9 class TestOfonoRadioSettings : public QObject
10 {
11     Q_OBJECT
12
13 private slots:
14
15     void technologyPreferenceChanged(const QString pref)
16     {
17         qDebug() << "technologyPreferenceChanged" << pref;
18     }
19
20     void validityChanged(bool validity)
21     {
22         qDebug() << "ValidityChanged" << validity;
23     }
24
25     void initTestCase()
26     {
27         m = new OfonoRadioSettings(QString(), this);
28         connect(m, SIGNAL(validityChanged(bool)), this, 
29                 SLOT(validityChanged(bool)));
30         connect(m, SIGNAL(technologyPreferenceChanged(QString)), 
31                 this, 
32                 SLOT(technologyPreferenceChanged(QString)));
33     }
34
35     void testOfonoRadioSettings()
36     {
37         qDebug() << "validity:" << m->isValid();
38         qDebug() << "technologyPreference():" << m->technologyPreference();
39         QTest::qWait(120000);
40     }
41
42
43     void cleanupTestCase()
44     {
45
46     }
47
48
49 private:
50     OfonoRadioSettings *m;
51 };
52
53 QTEST_MAIN(TestOfonoRadioSettings)
54 #include "test_ofonoradiosettings.moc"