messagingapp/msgui/appengine/tsrc/testconversationengine/src/testconversationengine.cpp
equal
deleted
inserted
replaced
101 // update the conversation view with modified conversation |
101 // update the conversation view with modified conversation |
102 TestConversationEngineStub::Instance()-> |
102 TestConversationEngineStub::Instance()-> |
103 UpdateConvEntry(TestConversationEngineStub::Instance()-> |
103 UpdateConvEntry(TestConversationEngineStub::Instance()-> |
104 GetConversationID()); |
104 GetConversationID()); |
105 |
105 |
|
106 ConversationsEngine::instance()->emitConversationModelUpdated(); |
|
107 |
106 //conversation engine should have emitted signal |
108 //conversation engine should have emitted signal |
107 QCOMPARE( convModify.count(), 1 ); |
109 QCOMPARE( convModify.count(), 1 ); |
108 } |
110 } |
109 |
111 |
110 //delete the conversation and validate updetad conversation view |
112 //delete the conversation and validate updetad conversation view |
123 QCOMPARE( convDelete.count(), 0 ); |
125 QCOMPARE( convDelete.count(), 0 ); |
124 |
126 |
125 // update the conversation view with deleted entry |
127 // update the conversation view with deleted entry |
126 TestConversationEngineStub::Instance()->UpdateDeletedConvEntry(); |
128 TestConversationEngineStub::Instance()->UpdateDeletedConvEntry(); |
127 |
129 |
|
130 ConversationsEngine::instance()->emitConversationModelUpdated(); |
|
131 |
128 //conversation engine should have emitted signal |
132 //conversation engine should have emitted signal |
129 QCOMPARE( convDelete.count(), 1 ); |
133 QCOMPARE( convDelete.count(), 1 ); |
130 } |
134 } |
131 |
135 |
132 //notify new recieved conversation and validate conversation view |
136 //notify new recieved conversation and validate conversation view |
318 //delete the conversation engine variable |
322 //delete the conversation engine variable |
319 delete ConversationsEngine::instance(); |
323 delete ConversationsEngine::instance(); |
320 //delete the stub data |
324 //delete the stub data |
321 delete TestConversationEngineStub::Instance(); |
325 delete TestConversationEngineStub::Instance(); |
322 } |
326 } |
|
327 |
|
328 |
|
329 //main entry point |
|
330 int main(int argc, char *argv[]) |
|
331 { |
|
332 int ret = -1; |
|
333 QCoreApplication app(argc, argv); |
|
334 QObject* tc = new TConversationEngine(); |
|
335 ret = QTest::qExec(tc, argc, argv); |
|
336 delete tc; |
|
337 return ret; |
|
338 } |
|
339 |