mpengine/tsrc/unittest_mpmpxcollectionframeworkwrapper/src/unittest_mpmpxcollectionframeworkwrapper.cpp
changeset 51 560ce2306a17
parent 43 0f32e550d9d8
child 55 f3930dda3342
equal deleted inserted replaced
47:4cc1412daed0 51:560ce2306a17
   398  Tests doIncrementalOpen. Part of private implementation.
   398  Tests doIncrementalOpen. Part of private implementation.
   399  */
   399  */
   400 void TestMpMpxCollectionFrameworkWrapper::testDoIncrementalOpen()
   400 void TestMpMpxCollectionFrameworkWrapper::testDoIncrementalOpen()
   401 {
   401 {
   402     mTestPrivate->DoIncrementalOpenL();
   402     mTestPrivate->DoIncrementalOpenL();
   403     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDelay, KIncrementalDelayHalfSecond);
   403     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDelay, KIncrementalDelay);
   404     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStop,TBool(ETrue));
   404     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStop,TBool(ETrue));
   405     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStart,TBool(ETrue));
   405     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStart,TBool(ETrue));
   406     QCOMPARE(mTestPrivate->iFirstIncrementalOpen,TBool(ETrue));
   406     QCOMPARE(mTestPrivate->iFirstIncrementalOpen,TBool(ETrue));
   407     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDirection,CMPXCollectionOpenUtility::EFetchNormal);
   407     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDirection,CMPXCollectionOpenUtility::EFetchDown);
   408     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iChunkSize, KIncrementalFetchBlockSize);
   408     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iChunkSize, KIncrementalFetchBlockSize);
   409 }
   409 }
   410 
   410 
   411 /*!
   411 /*!
   412  Tests reopenCollection.
   412  Tests reopenCollection.
   768     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralEvent,TMPXCollectionMessage::EPathChanged);
   768     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralEvent,TMPXCollectionMessage::EPathChanged);
   769     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralType,EMcPathChangedByOpen);
   769     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralType,EMcPathChangedByOpen);
   770     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralData,EMcContainerOpened);
   770     testMessage->SetTObjectValueL<TInt>(KMPXMessageGeneralData,EMcContainerOpened);
   771     mTestPrivate->DoHandleCollectionMessageL(*testMessage);
   771     mTestPrivate->DoHandleCollectionMessageL(*testMessage);
   772     //mTestPrivate->HandleCollectionMessage(*testMessage, KErrNone);
   772     //mTestPrivate->HandleCollectionMessage(*testMessage, KErrNone);
   773     QCOMPARE(mTestPrivate->iCollectionUtility->iOpen,TBool(EFalse)); 
   773     QCOMPARE(mTestPrivate->iCollectionUtility->iOpen,TBool(EFalse));
   774     
   774 
   775     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDelay, KIncrementalDelayHalfSecond);
   775     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDelay, KIncrementalDelay);
   776     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStop,TBool(ETrue));
   776     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStop,TBool(ETrue));
   777     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStart,TBool(ETrue));
   777     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iStart,TBool(ETrue));
   778     QCOMPARE(mTestPrivate->iFirstIncrementalOpen,TBool(ETrue));
   778     QCOMPARE(mTestPrivate->iFirstIncrementalOpen,TBool(ETrue));
   779     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDirection,CMPXCollectionOpenUtility::EFetchNormal);
   779     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iDirection,CMPXCollectionOpenUtility::EFetchDown);
   780     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iChunkSize, KIncrementalFetchBlockSize);
   780     QCOMPARE(mTestPrivate->iIncrementalOpenUtil->iChunkSize, KIncrementalFetchBlockSize);
   781 
   781 
   782     //Opened a song
   782     //Opened a song
   783     cleanup();
   783     cleanup();
   784     init();
   784     init();