diff options
author | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-05 03:42:25 -0300 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-14 16:38:21 +0100 |
commit | 127f97b7836ffb202975fabb55df2ff3e8c41392 (patch) | |
tree | aab1fc470430a7c47d71058f8b914960833c0a81 | |
parent | 15706b9fe638dc44cfcd2931aad58572196c9af6 (diff) |
account-basics test: Add test for Account.ConnectsAutomatically.
-rw-r--r-- | qt4/tests/dbus/account-basics.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt4/tests/dbus/account-basics.cpp b/qt4/tests/dbus/account-basics.cpp index 8a37136b7..7c76c77f0 100644 --- a/qt4/tests/dbus/account-basics.cpp +++ b/qt4/tests/dbus/account-basics.cpp @@ -39,6 +39,7 @@ protected Q_SLOTS: void onAccountAvatarChanged(const Tp::Avatar &); void onAccountParametersChanged(const QVariantMap &); void onAccountCapabilitiesChanged(const Tp::ConnectionCapabilities &); + void onAccountConnectsAutomaticallyChanged(bool); private Q_SLOTS: void initTestCase(); @@ -71,6 +72,8 @@ private: QVariantMap mParameters; bool mCapabilitiesChanged; ConnectionCapabilities mCapabilities; + bool mConnectsAutomaticallyChanged; + bool mConnectsAutomatically; }; #define TEST_VERIFY_PROPERTY_CHANGE(acc, Type, PropertyName, propertyName, expectedValue) \ @@ -127,6 +130,7 @@ TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const QString &, Nickname) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const Avatar &, Avatar) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const QVariantMap &, Parameters) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const ConnectionCapabilities &, Capabilities) +TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(bool, ConnectsAutomatically) QStringList TestAccountBasics::pathsForAccounts(const QList<AccountPtr> &list) { @@ -183,6 +187,8 @@ void TestAccountBasics::init() mParameters = QVariantMap(); mCapabilitiesChanged = false; mCapabilities = ConnectionCapabilities(); + mConnectsAutomaticallyChanged = false; + mConnectsAutomatically = false; initImpl(); } @@ -342,6 +348,10 @@ void TestAccountBasics::testBasics() TEST_VERIFY_PROPERTY_CHANGE_EXTENDED(acc, QVariantMap, Parameters, parameters, parametersChanged, acc->updateParameters(expectedParameters, QStringList()), expectedParameters); + TEST_VERIFY_PROPERTY_CHANGE_EXTENDED(acc, bool, + ConnectsAutomatically, connectsAutomatically, connectsAutomaticallyPropertyChanged, + acc->setConnectsAutomatically(true), true); + qDebug() << "creating another account"; pacc = mAM->createAccount(QLatin1String("spurious"), QLatin1String("normal"), QLatin1String("foobar"), QVariantMap()); |