summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swift/Controllers/UnitTest/PresenceNotifierTest.cpp')
-rw-r--r--Swift/Controllers/UnitTest/PresenceNotifierTest.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
index 969555c..42cfc5f 100644
--- a/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
+++ b/Swift/Controllers/UnitTest/PresenceNotifierTest.cpp
@@ -165,12 +165,13 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
void testNotificationSubjectContainsNameForJIDInRoster() {
std::auto_ptr<PresenceNotifier> testling = createNotifier();
- roster->addContact(user1.toBare(), "User 1", std::vector<String>(), RosterItemPayload::Both);
+ roster->addContact(user1.toBare(), "User 1", std::vector<std::string>(), RosterItemPayload::Both);
sendPresence(user1, StatusShow::Online);
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(notifier->notifications.size()));
- CPPUNIT_ASSERT(notifier->notifications[0].subject.contains("User 1"));
+ std::string subject = notifier->notifications[0].subject;
+ CPPUNIT_ASSERT(subject.find("User 1") != std::string::npos);
}
void testNotificationSubjectContainsJIDForJIDNotInRoster() {
@@ -179,7 +180,8 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
sendPresence(user1, StatusShow::Online);
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(notifier->notifications.size()));
- CPPUNIT_ASSERT(notifier->notifications[0].subject.contains(user1.toBare().toString()));
+ std::string subject = notifier->notifications[0].subject;
+ CPPUNIT_ASSERT(subject.find(user1.toBare().toString()) != std::string::npos);
}
void testNotificationSubjectContainsStatus() {
@@ -188,7 +190,8 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
sendPresence(user1, StatusShow::Away);
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(notifier->notifications.size()));
- CPPUNIT_ASSERT(notifier->notifications[0].subject.contains("Away"));
+ std::string subject = notifier->notifications[0].subject;
+ CPPUNIT_ASSERT(subject.find("Away") != std::string::npos);
}
void testNotificationMessageContainsStatusMessage() {
@@ -197,7 +200,7 @@ class PresenceNotifierTest : public CppUnit::TestFixture {
sendPresence(user1, StatusShow::Away);
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(notifier->notifications.size()));
- CPPUNIT_ASSERT(notifier->notifications[0].description.contains("Status Message"));
+ CPPUNIT_ASSERT(notifier->notifications[0].description.find("Status Message") != std::string::npos);
}
void testReceiveFirstPresenceWithQuietPeriodDoesNotNotify() {