170 { |
170 { |
171 LogsEvent event; |
171 LogsEvent event; |
172 QtContactsStubsHelper::reset(); |
172 QtContactsStubsHelper::reset(); |
173 QContactName name; |
173 QContactName name; |
174 QtContactsStubsHelper::setContactNames("firstname", ""); |
174 QtContactsStubsHelper::setContactNames("firstname", ""); |
175 QVERIFY(event.parseContactName(name) == "firstname"); |
175 QCOMPARE(event.parseContactName(name), QString("firstname")); |
176 |
176 |
177 QtContactsStubsHelper::setContactNames("firstname", "lastname"); |
177 QtContactsStubsHelper::setContactNames("firstname", "lastname"); |
178 QVERIFY(event.parseContactName(name) == "firstname lastname"); |
178 QCOMPARE(event.parseContactName(name), QString("firstname lastname")); |
179 |
179 |
180 QtContactsStubsHelper::setContactNames("", "lastname"); |
180 QtContactsStubsHelper::setContactNames("", "lastname"); |
181 QVERIFY(event.parseContactName(name) == "lastname"); |
181 QCOMPARE(event.parseContactName(name), QString("lastname")); |
182 |
182 |
183 QtContactsStubsHelper::setContactNames("", ""); |
183 QtContactsStubsHelper::setContactNames("", ""); |
184 QVERIFY(event.parseContactName(name) == ""); |
184 QCOMPARE(event.parseContactName(name), QString("")); |
185 } |
185 } |
186 |
186 |
187 void UT_LogsEvent::testSerialization() |
187 void UT_LogsEvent::testSerialization() |
188 { |
188 { |
189 // Serialize/deserialize, no event data |
189 // Serialize/deserialize, no event data |