diff options
author | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-05 03:35:05 -0300 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-14 16:38:21 +0100 |
commit | 1f2ebd2c3e41addd41234dec18a3956d749adcfb (patch) | |
tree | a0c71362d4dec990cd8e5fa242eebcae98e47f01 /qt4/tests | |
parent | e9bf1384c22820352abca4e34334ff1364404d09 (diff) |
account-basics test: Add test for Account.DisplayName.
Diffstat (limited to 'qt4/tests')
-rw-r--r-- | qt4/tests/dbus/account-basics.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/qt4/tests/dbus/account-basics.cpp b/qt4/tests/dbus/account-basics.cpp index 725e6d0ef..0e17bb481 100644 --- a/qt4/tests/dbus/account-basics.cpp +++ b/qt4/tests/dbus/account-basics.cpp @@ -32,6 +32,7 @@ public: protected Q_SLOTS: void onNewAccount(const Tp::AccountPtr &); void onAccountServiceNameChanged(const QString &); + void onAccountDisplayNameChanged(const QString &); void onAccountIconNameChanged(const QString &); void onAccountAvatarChanged(const Tp::Avatar &); void onAccountCapabilitiesChanged(const Tp::ConnectionCapabilities &); @@ -55,6 +56,8 @@ private: bool mServiceNameChanged; QString mServiceName; + bool mDisplayNameChanged; + QString mDisplayName; bool mIconNameChanged; QString mIconName; bool mAvatarChanged; @@ -111,6 +114,7 @@ void TestAccountBasics::onNewAccount(const Tp::AccountPtr &acc) } TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const QString &, ServiceName) +TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const QString &, DisplayName) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const QString &, IconName) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const Avatar &, Avatar) TEST_IMPLEMENT_PROPERTY_CHANGE_SLOT(const ConnectionCapabilities &, Capabilities) @@ -158,6 +162,8 @@ void TestAccountBasics::init() { mServiceNameChanged = false; mServiceName = QString(); + mDisplayNameChanged = false; + mDisplayName = QString(); mIconNameChanged = false; mIconName = QString(); mAvatarChanged = false; @@ -295,6 +301,8 @@ void TestAccountBasics::testBasics() QCOMPARE(acc->uniqueIdentifier(), QLatin1String("foo/bar/Account0")); QCOMPARE(acc->normalizedName(), QLatin1String("bob")); + TEST_VERIFY_PROPERTY_CHANGE(acc, QString, DisplayName, displayName, QLatin1String("foo@bar")); + TEST_VERIFY_PROPERTY_CHANGE(acc, QString, IconName, iconName, QLatin1String("im-foo")); // Setting icon to an empty string should fallback to im-$protocol as FeatureProtocolInfo and |