~ken-vandine/ubuntu/wily/libqofono/libqofono-0.79

« back to all changes in this revision

Viewing changes to test/auto/tests/tst_qofonoconnmancontext.cpp

  • Committer: Ken VanDine
  • Author(s): Ken VanDine, Jonas Drange
  • Date: 2015-05-21 20:16:51 UTC
  • Revision ID: ken.vandine@canonical.com-20150521201651-boa8e4wvl26l369h
Tags: 0.70-0ubuntu4
[ Jonas Drange ]
* debian/patches/connman-resetcontexts.patch
  - Added bindings to Ofono's reset context API (LP: #1338758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        QTRY_COMPARE(context->isValid(), true);
62
62
 
63
63
        QSignalSpy active(context, SIGNAL(activeChanged(bool)));
 
64
        QSignalSpy preferred(context, SIGNAL(preferredChanged(bool)));
64
65
        QSignalSpy apn(context,SIGNAL(accessPointNameChanged(QString)));
65
66
        QSignalSpy name(context, SIGNAL(nameChanged(QString)));
66
67
        QSignalSpy type (context, SIGNAL(typeChanged(QString)));
93
94
        QTRY_COMPARE(active.count(), 1);
94
95
        QCOMPARE(active.takeFirst().at(0).toBool(), true);
95
96
 
 
97
        context->setPreferred(true);
 
98
        QTRY_COMPARE(preferred.count(), 1);
 
99
        QCOMPARE(preferred.takeFirst().at(0).toBool(), true);
 
100
 
96
101
        QTRY_COMPARE(sett6.count(), 1);
97
102
        QCOMPARE(sett6.takeFirst().at(0).toMap()["Interface"].value<QString>().left(5),
98
103
            QString("dummy")); // "dummy" plus number
109
114
        QCOMPARE(sett.count(), 0);
110
115
        QCOMPARE(proto.count(), 0);
111
116
        QCOMPARE(active.count(), 0);
 
117
        QCOMPARE(preferred.count(), 0);
112
118
 
113
119
        context->setActive(false);
114
120
        QTRY_COMPARE(active.count(), 1);
115
121
        QCOMPARE(active.takeFirst().at(0).toBool(), false);
116
122
 
 
123
        context->setPreferred(false);
 
124
        QTRY_COMPARE(preferred.count(), 1);
 
125
        QCOMPARE(preferred.takeFirst().at(0).toBool(), false);
 
126
 
117
127
        delete context;
118
128
 
119
129
        m->removeContext(contextid);