~ci-train-bot/history-service/history-service-ubuntu-yakkety-landing-052

« back to all changes in this revision

Viewing changes to tests/libhistoryservice/ManagerTest.cpp

Request contact information for all known participants on history-daemon initialization, and use this cached information on the models.
Approved by: Tiago Salem Herrmann, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2015 Canonical, Ltd.
3
3
 *
4
4
 * This file is part of history-service.
5
5
 *
96
96
 
97
97
    QCOMPARE(thread.accountId(), accountId);
98
98
    QCOMPARE(thread.type(), type);
99
 
    QCOMPARE(thread.participants(), participants);
 
99
    QCOMPARE(thread.participants().identifiers(), participants);
100
100
 
101
101
    // now try to get the thread again to see if it is returned correctly
102
102
    History::Thread sameThread = mManager->threadForParticipants(accountId, type, participantsToMatch, matchFlags, false);
152
152
        History::TextEvent textEvent(textThread.accountId(),
153
153
                                     textThread.threadId(),
154
154
                                     QString("eventId%1").arg(i),
155
 
                                     textThread.participants().first(),
 
155
                                     textThread.participants().first().identifier(),
156
156
                                     QDateTime::currentDateTime(),
157
157
                                     true,
158
158
                                     QString("Hello world %1").arg(i),
163
163
        History::VoiceEvent voiceEvent(voiceThread.accountId(),
164
164
                                       voiceThread.threadId(),
165
165
                                       QString("eventId%1").arg(i),
166
 
                                       voiceThread.participants().first(),
 
166
                                       voiceThread.participants().first().identifier(),
167
167
                                       QDateTime::currentDateTime(),
168
168
                                       true,
169
169
                                       true);
229
229
        History::TextEvent textEvent(textThread.accountId(),
230
230
                                     textThread.threadId(),
231
231
                                     QString("eventToBeRemoved%1").arg(i),
232
 
                                     textThread.participants().first(),
 
232
                                     textThread.participants().first().identifier(),
233
233
                                     QDateTime::currentDateTime(),
234
234
                                     true,
235
235
                                     QString("Hello world %1").arg(i),
239
239
        History::VoiceEvent voiceEvent(voiceThread.accountId(),
240
240
                                       voiceThread.threadId(),
241
241
                                       QString("eventToBeRemoved%1").arg(i),
242
 
                                       voiceThread.participants().first(),
 
242
                                       voiceThread.participants().first().identifier(),
243
243
                                       QDateTime::currentDateTime(),
244
244
                                       true,
245
245
                                       true);
354
354
        History::TextEvent textEvent(textThread.accountId(),
355
355
                                     textThread.threadId(),
356
356
                                     QString("eventToBeRemoved%1").arg(i),
357
 
                                     textThread.participants().first(),
 
357
                                     textThread.participants().first().identifier(),
358
358
                                     QDateTime::currentDateTime(),
359
359
                                     true,
360
360
                                     QString("Hello world %1").arg(i),
364
364
        History::VoiceEvent voiceEvent(voiceThread.accountId(),
365
365
                                       voiceThread.threadId(),
366
366
                                       QString("eventToBeRemoved%1").arg(i),
367
 
                                       voiceThread.participants().first(),
 
367
                                       voiceThread.participants().first().identifier(),
368
368
                                       QDateTime::currentDateTime(),
369
369
                                       true,
370
370
                                       true);