mediator/tsrc/public/basic/src/MediatorTestCases.cpp
branchRCL_3
changeset 21 ccb4f6b3db21
parent 0 4e1aa6a622a0
child 22 8cb079868133
equal deleted inserted replaced
20:1ddbe54d0645 21:ccb4f6b3db21
   152     */ 
   152     */ 
   153     
   153     
   154     static TCaseInfoInternal const KCases[] =
   154     static TCaseInfoInternal const KCases[] =
   155         {
   155         {
   156         // To add new test cases, add new items to this array
   156         // To add new test cases, add new items to this array
   157         FUNCENTRY( RegisterOneEvent ),
   157         ENTRY( "[CMediatorTest] RegisterOneEvent", &CMediatorTest::RegisterOneEvent ),
   158         FUNCENTRY( GetListOfDomainsInitL ),        
   158         ENTRY( "[CMediatorTest] GetListOfDomainsInitL", &CMediatorTest::GetListOfDomainsInitL ),
   159         FUNCENTRY( GetListOfDomains1DomainL ),
   159         ENTRY( "[CMediatorTest] GetListOfDomains1DomainL", &CMediatorTest::GetListOfDomains1DomainL ),
   160         FUNCENTRY( GetListOfEvents1EventInCategoryL ),
   160         ENTRY( "[CMediatorTest] GetListOfEvents1EventInCategoryL", &CMediatorTest::GetListOfEvents1EventInCategoryL ),
   161         FUNCENTRY( RegisterMultipleEventsL ),
   161         ENTRY( "[CMediatorTest] RegisterMultipleEventsL", &CMediatorTest::RegisterMultipleEventsL ),
   162         FUNCENTRY( RegisterOver500EventsL ),
   162         ENTRY( "[CMediatorTest] RegisterOver500EventsL", &CMediatorTest::RegisterOver500EventsL ),
   163         FUNCENTRY( UnregisterNonExistingEventDom ),
   163         ENTRY( "[CMediatorTest] UnregisterNonExistingEventDom", &CMediatorTest::UnregisterNonExistingEventDom ),
   164         FUNCENTRY( GetListOfDomainsMultipleDomainsL ),
   164         ENTRY( "[CMediatorTest] GetListOfDomainsMultipleDomainsL", &CMediatorTest::GetListOfDomainsMultipleDomainsL ),
   165         FUNCENTRY( UnregisterNonExistingEventCat ),
   165         ENTRY( "[CMediatorTest] UnregisterNonExistingEventCat", &CMediatorTest::UnregisterNonExistingEventCat ),
   166         FUNCENTRY( UnregisterNonExistingEventEve ),
   166         ENTRY( "[CMediatorTest] UnregisterNonExistingEventEve", &CMediatorTest::UnregisterNonExistingEventEve ),
   167         FUNCENTRY( UnregisterExistingEvent ),
   167         ENTRY( "[CMediatorTest] UnregisterExistingEvent", &CMediatorTest::UnregisterExistingEvent ),
   168         FUNCENTRY( UnregisterRxistingEventDifferentSID ),
   168         ENTRY( "[CMediatorTest] UnregisterRxistingEventDifferentSID", &CMediatorTest::UnregisterRxistingEventDifferentSID ),
   169         FUNCENTRY( UnregisterAListOfEventsL ),
   169         ENTRY( "[CMediatorTest] UnregisterAListOfEventsL", &CMediatorTest::UnregisterAListOfEventsL ),
   170         FUNCENTRY( UnregisterAListOfEventsNotRegisteredL ),
   170         ENTRY( "[CMediatorTest] UnregisterAListOfEventsNotRegisteredL", &CMediatorTest::UnregisterAListOfEventsNotRegisteredL ),
   171         FUNCENTRY( SubscribeToNonExistingEventDom ),
   171         ENTRY( "[CMediatorTest] SubscribeToNonExistingEventDom", &CMediatorTest::SubscribeToNonExistingEventDom ),
   172         FUNCENTRY( SubscribeToNonExistingEventCat ),
   172         ENTRY( "[CMediatorTest] SubscribeToNonExistingEventCat", &CMediatorTest::SubscribeToNonExistingEventCat ),
   173         FUNCENTRY( SubscribeToNonExistingEventEve ),
   173         ENTRY( "[CMediatorTest] SubscribeToNonExistingEventEve", &CMediatorTest::SubscribeToNonExistingEventEve ),
   174         FUNCENTRY( SubscribeToWrongEventVersionMajor ),
   174         ENTRY( "[CMediatorTest] SubscribeToWrongEventVersionMajor", &CMediatorTest::SubscribeToWrongEventVersionMajor ),
   175         FUNCENTRY( SubscribeToEventNonExistCapabilities ),
   175         ENTRY( "[CMediatorTest] SubscribeToEventNonExistCapabilities", &CMediatorTest::SubscribeToEventNonExistCapabilities ),
   176         FUNCENTRY( SubscribeToEventCorrectParam ),
   176         ENTRY( "[CMediatorTest] SubscribeToEventCorrectParam", &CMediatorTest::SubscribeToEventCorrectParam ),
   177         FUNCENTRY( SubscribeToListOfEventsCorrectParamL ),
   177         ENTRY( "[CMediatorTest] SubscribeToListOfEventsCorrectParamL", &CMediatorTest::SubscribeToListOfEventsCorrectParamL ),
   178         FUNCENTRY( SubscribeToListOfEventsOneInfoIncorrectL ),
   178         ENTRY( "[CMediatorTest] SubscribeToListOfEventsOneInfoIncorrectL", &CMediatorTest::SubscribeToListOfEventsOneInfoIncorrectL ),
   179         FUNCENTRY( RaiseNonExistingEventWrongDomainL ),
   179         ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongDomainL", &CMediatorTest::RaiseNonExistingEventWrongDomainL ),
   180         FUNCENTRY( RaiseNonExistingEventWrongCatL ),
   180         ENTRY( "[CMediatorTest] RaiseNonExistingEventWrongCatL", &CMediatorTest::RaiseNonExistingEventWrongCatL ),
   181         FUNCENTRY( RaiseNonExistingEventEveL ),
   181         ENTRY( "[CMediatorTest] RaiseNonExistingEventEveL", &CMediatorTest::RaiseNonExistingEventEveL ),
   182         FUNCENTRY( RaiseEventWithWrongEventVerMajorL ),
   182         ENTRY( "[CMediatorTest] RaiseEventWithWrongEventVerMajorL", &CMediatorTest::RaiseEventWithWrongEventVerMajorL ),
   183         FUNCENTRY( RaiseEventRequiresNotExistingCapsInPubL ),
   183         ENTRY( "[CMediatorTest] RaiseEventRequiresNotExistingCapsInPubL", &CMediatorTest::RaiseEventRequiresNotExistingCapsInPubL ),
   184         FUNCENTRY( RaiseExistingEventL ),
   184         ENTRY( "[CMediatorTest] RaiseExistingEventL", &CMediatorTest::RaiseExistingEventL ),
   185         FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideL ),
   185         ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideL ),
   186         FUNCENTRY( SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
   186         ENTRY( "[CMediatorTest] SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL", &CMediatorTest::SubscribeExistingEventRaiseFromPublisherSideDataOver1kBL ),
   187         FUNCENTRY( SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
   187         ENTRY( "[CMediatorTest] SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL", &CMediatorTest::SubscribeToEventDeleteConsumerInstanceRaiseEventFromPublisherL ),
   188         FUNCENTRY( Add2ndSubscriberToEventRaiseEventFromPublisherL ),
   188         ENTRY( "[CMediatorTest] Add2ndSubscriberToEventRaiseEventFromPublisherL", &CMediatorTest::Add2ndSubscriberToEventRaiseEventFromPublisherL ),
   189         FUNCENTRY( UnsubscribeFrom1stSubscriberL ),
   189         ENTRY( "[CMediatorTest] UnsubscribeFrom1stSubscriberL", &CMediatorTest::UnsubscribeFrom1stSubscriberL ),
   190         FUNCENTRY( SubscribeToEventRaise500TimesInLoopL ),
   190         ENTRY( "[CMediatorTest] SubscribeToEventRaise500TimesInLoopL", &CMediatorTest::SubscribeToEventRaise500TimesInLoopL ),
   191         FUNCENTRY( RegisterOneCommandToMediator ),
   191         ENTRY( "[CMediatorTest] RegisterOneCommandToMediator", &CMediatorTest::RegisterOneCommandToMediator ),
   192         FUNCENTRY( RegisterMultipleCommandsToMediatorL ),
   192         ENTRY( "[CMediatorTest] RegisterMultipleCommandsToMediatorL", &CMediatorTest::RegisterMultipleCommandsToMediatorL ),
   193         FUNCENTRY( RegisterOver500CommandsWithinOneCatL ),
   193         ENTRY( "[CMediatorTest] RegisterOver500CommandsWithinOneCatL", &CMediatorTest::RegisterOver500CommandsWithinOneCatL ),
   194         FUNCENTRY( RegisterCommandWithDomainUID0 ),
   194         ENTRY( "[CMediatorTest] RegisterCommandWithDomainUID0", &CMediatorTest::RegisterCommandWithDomainUID0 ),
   195         FUNCENTRY( RegisterCommandWithCategoryUID0 ),
   195         ENTRY( "[CMediatorTest] RegisterCommandWithCategoryUID0", &CMediatorTest::RegisterCommandWithCategoryUID0 ),
   196         FUNCENTRY( RegisterCommandWithCommandID0 ),
   196         ENTRY( "[CMediatorTest] RegisterCommandWithCommandID0", &CMediatorTest::RegisterCommandWithCommandID0 ),
   197         FUNCENTRY( RegisterCommandWithTimeoutValue0 ),
   197         ENTRY( "[CMediatorTest] RegisterCommandWithTimeoutValue0", &CMediatorTest::RegisterCommandWithTimeoutValue0 ),
   198         FUNCENTRY( IssueNonExistingCommandWrongDomainL ),
   198         ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongDomainL", &CMediatorTest::IssueNonExistingCommandWrongDomainL ),
   199         FUNCENTRY( IssueNonExistingCommandWrongCatL ),
   199         ENTRY( "[CMediatorTest] IssueNonExistingCommandWrongCatL", &CMediatorTest::IssueNonExistingCommandWrongCatL ),
   200         FUNCENTRY( IssueNonExistingCommandIdL ),
   200         ENTRY( "[CMediatorTest] IssueNonExistingCommandIdL", &CMediatorTest::IssueNonExistingCommandIdL ),
   201         FUNCENTRY( IssueCommandWrongCommandVerMajorL ),
   201         ENTRY( "[CMediatorTest] IssueCommandWrongCommandVerMajorL", &CMediatorTest::IssueCommandWrongCommandVerMajorL ),
   202         FUNCENTRY( IssueCommandL ),
   202         ENTRY( "[CMediatorTest] IssueCommandL", &CMediatorTest::IssueCommandL ),
   203         FUNCENTRY( IssueCommand2L ),
   203         ENTRY( "[CMediatorTest] IssueCommand2L", &CMediatorTest::IssueCommand2L ),
   204         FUNCENTRY( IssueExistingCommandSameInitiatorWhileProcessingL ),
   204         ENTRY( "[CMediatorTest] IssueExistingCommandSameInitiatorWhileProcessingL", &CMediatorTest::IssueExistingCommandSameInitiatorWhileProcessingL ),
   205         FUNCENTRY( IssueCommandWaitWithoutRespondingToCommandL ),
   205         ENTRY( "[CMediatorTest] IssueCommandWaitWithoutRespondingToCommandL", &CMediatorTest::IssueCommandWaitWithoutRespondingToCommandL ),
   206         FUNCENTRY( IssueCommandCancelFromInitiatorBeforeTimeoutL ),
   206         ENTRY( "[CMediatorTest] IssueCommandCancelFromInitiatorBeforeTimeoutL", &CMediatorTest::IssueCommandCancelFromInitiatorBeforeTimeoutL ),
   207         FUNCENTRY( IssueCommandRespondCorrectlyFromResponderL ),
   207         ENTRY( "[CMediatorTest] IssueCommandRespondCorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondCorrectlyFromResponderL ),
   208         FUNCENTRY( IssueCommandALotOfParameterDataL ),
   208         ENTRY( "[CMediatorTest] IssueCommandALotOfParameterDataL", &CMediatorTest::IssueCommandALotOfParameterDataL ),
   209         FUNCENTRY( IssueCommandRespondALotOfResponseDataL ),
   209         ENTRY( "[CMediatorTest] IssueCommandRespondALotOfResponseDataL", &CMediatorTest::IssueCommandRespondALotOfResponseDataL ),
   210         //FUNCENTRY( GetListOfDomainsOver500Domains ),
   210         //ENTRY( "[CMediatorTest] GetListOfDomainsOver500Domains", &CMediatorTest::GetListOfDomainsOver500Domains ),
   211         FUNCENTRY( GetListOfCategoriesNoCategoriesL ),
   211         ENTRY( "[CMediatorTest] GetListOfCategoriesNoCategoriesL", &CMediatorTest::GetListOfCategoriesNoCategoriesL ),
   212         FUNCENTRY( GetListOfCategoriesIncorrectDomainUIDL ),
   212         ENTRY( "[CMediatorTest] GetListOfCategoriesIncorrectDomainUIDL", &CMediatorTest::GetListOfCategoriesIncorrectDomainUIDL ),
   213         FUNCENTRY( GetListOfCategoriesMultipleCategoriesL ),
   213         ENTRY( "[CMediatorTest] GetListOfCategoriesMultipleCategoriesL", &CMediatorTest::GetListOfCategoriesMultipleCategoriesL ),
   214         FUNCENTRY( GetListOfCommandsL ),
   214         ENTRY( "[CMediatorTest] GetListOfCommandsL", &CMediatorTest::GetListOfCommandsL ),
   215         FUNCENTRY( GetListOfCommandsIncorrectDomainUIDL ),
   215         ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectDomainUIDL", &CMediatorTest::GetListOfCommandsIncorrectDomainUIDL ),
   216         FUNCENTRY( GetListOfCommandsIncorrectCategoryUIDL ),
   216         ENTRY( "[CMediatorTest] GetListOfCommandsIncorrectCategoryUIDL", &CMediatorTest::GetListOfCommandsIncorrectCategoryUIDL ),
   217         FUNCENTRY( GetListOfCommands1CommandL ),
   217         ENTRY( "[CMediatorTest] GetListOfCommands1CommandL", &CMediatorTest::GetListOfCommands1CommandL ),
   218         FUNCENTRY( GetListOfCommandsMultipleCommandsL ),
   218         ENTRY( "[CMediatorTest] GetListOfCommandsMultipleCommandsL", &CMediatorTest::GetListOfCommandsMultipleCommandsL ),
   219         FUNCENTRY( GetListOfCommandsOver500CommandsL ),
   219         ENTRY( "[CMediatorTest] GetListOfCommandsOver500CommandsL", &CMediatorTest::GetListOfCommandsOver500CommandsL ),
   220         FUNCENTRY( GetListOfEventsNoEventsInCategoryL ),
   220         ENTRY( "[CMediatorTest] GetListOfEventsNoEventsInCategoryL", &CMediatorTest::GetListOfEventsNoEventsInCategoryL ),
   221         FUNCENTRY( GetListOfEventsWithIncorrectDomainUIDL ),
   221         ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectDomainUIDL", &CMediatorTest::GetListOfEventsWithIncorrectDomainUIDL ),
   222         FUNCENTRY( GetListOfEventsWithIncorrectCategoryUIDL ),
   222         ENTRY( "[CMediatorTest] GetListOfEventsWithIncorrectCategoryUIDL", &CMediatorTest::GetListOfEventsWithIncorrectCategoryUIDL ),
   223         FUNCENTRY( GetListOfEventsMultipleEventsInCategoryL ),
   223         ENTRY( "[CMediatorTest] GetListOfEventsMultipleEventsInCategoryL", &CMediatorTest::GetListOfEventsMultipleEventsInCategoryL ),
   224         FUNCENTRY( GetListOfEventsOver500EventsInCategoryL ),
   224         ENTRY( "[CMediatorTest] GetListOfEventsOver500EventsInCategoryL", &CMediatorTest::GetListOfEventsOver500EventsInCategoryL ),
   225         FUNCENTRY( SubscribeNotificationReceiver ),
   225         ENTRY( "[CMediatorTest] SubscribeNotificationReceiver", &CMediatorTest::SubscribeNotificationReceiver ),
   226         FUNCENTRY( ReSubscribeNotificationReceiver ),
   226         ENTRY( "[CMediatorTest] ReSubscribeNotificationReceiver", &CMediatorTest::ReSubscribeNotificationReceiver ),
   227         FUNCENTRY( ReUnsubscribeNotificationReceiver ),
   227         ENTRY( "[CMediatorTest] ReUnsubscribeNotificationReceiver", &CMediatorTest::ReUnsubscribeNotificationReceiver ),
   228         FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsL ),
   228         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsL ),
   229         FUNCENTRY( SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
   229         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregCommandsSoThatCatIsEmptyL ),
   230         FUNCENTRY( SubscribeNotificationReceiverRegisterEventsL ),
   230         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsL", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsL ),
   231         FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsL ),
   231         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsL ),
   232         FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
   232         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatCatIsEmptyL ),
   233         FUNCENTRY( SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
   233         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverRegisterCommandsSoThatErrorInRegistrationL ),
   234         FUNCENTRY( SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
   234         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL", &CMediatorTest::SubscribeNotificationReceiverUnegisterCommandsSoThatErrorInRegistrationL ),
   235         FUNCENTRY( SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
   235         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverRegisterEventsSoThatErrorInRegistration ),
   236         FUNCENTRY( SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
   236         ENTRY( "[CMediatorTest] SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration", &CMediatorTest::SubscribeNotificationReceiverUnregisterEventsSoThatErrorInRegistration ),
   237         FUNCENTRY( IssueCommandCancelAndReissueL ),
   237         ENTRY( "[CMediatorTest] IssueCommandCancelAndReissueL", &CMediatorTest::IssueCommandCancelAndReissueL ),
   238         FUNCENTRY( IssueCommandCancelAndIssueNewCommandL ),
   238         ENTRY( "[CMediatorTest] IssueCommandCancelAndIssueNewCommandL", &CMediatorTest::IssueCommandCancelAndIssueNewCommandL ),
   239         FUNCENTRY( InstantiateAndDeleteMediatorPluginL ),
   239         ENTRY( "[CMediatorTest] InstantiateAndDeleteMediatorPluginL", &CMediatorTest::InstantiateAndDeleteMediatorPluginL ),
   240         FUNCENTRY( IssueCommandNoDataL ),
   240         ENTRY( "[CMediatorTest] IssueCommandNoDataL", &CMediatorTest::IssueCommandNoDataL ),
   241         FUNCENTRY( RaiseEventNoDataL ),
   241         ENTRY( "[CMediatorTest] RaiseEventNoDataL", &CMediatorTest::RaiseEventNoDataL ),
   242         FUNCENTRY( RegisterMultipleEventsWithMultipleUIDsL ),
   242         ENTRY( "[CMediatorTest] RegisterMultipleEventsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleEventsWithMultipleUIDsL ),
   243         FUNCENTRY( RegisterMultipleCommandsWithMultipleUIDsL ),
   243         ENTRY( "[CMediatorTest] RegisterMultipleCommandsWithMultipleUIDsL", &CMediatorTest::RegisterMultipleCommandsWithMultipleUIDsL ),
   244         FUNCENTRY( IssueCommandRespondIncorrectlyFromResponderL ),
   244         ENTRY( "[CMediatorTest] IssueCommandRespondIncorrectlyFromResponderL", &CMediatorTest::IssueCommandRespondIncorrectlyFromResponderL ),
   245         FUNCENTRY( OOMForEventProviderTestL ),
   245         ENTRY( "[CMediatorTest] OOMForEventProviderTestL", &CMediatorTest::OOMForEventProviderTestL ),
   246         FUNCENTRY( OOMForEventConsumerTestL ),
   246         ENTRY( "[CMediatorTest] OOMForEventConsumerTestL", &CMediatorTest::OOMForEventConsumerTestL ),
   247         FUNCENTRY( OOMForEventProviderwithListTestL ),
   247         ENTRY( "[CMediatorTest] OOMForEventProviderwithListTestL", &CMediatorTest::OOMForEventProviderwithListTestL ),
   248         FUNCENTRY( OOMForEventConsumerWithEventTestL ),
   248         ENTRY( "[CMediatorTest] OOMForEventConsumerWithEventTestL", &CMediatorTest::OOMForEventConsumerWithEventTestL ),
   249         FUNCENTRY( OOMForCommandInitiatorTestL ),
   249         ENTRY( "[CMediatorTest] OOMForCommandInitiatorTestL", &CMediatorTest::OOMForCommandInitiatorTestL ),
   250         FUNCENTRY( OOMForCommandInitiatorCommandListTestL ),
   250         ENTRY( "[CMediatorTest] OOMForCommandInitiatorCommandListTestL", &CMediatorTest::OOMForCommandInitiatorCommandListTestL ),
   251         FUNCENTRY( OOMForMediatorNotificationsTestL )
   251         ENTRY( "[CMediatorTest] OOMForMediatorNotificationsTestL", &CMediatorTest::OOMForMediatorNotificationsTestL )
   252         // Example how to use OOM functionality
   252         // Example how to use OOM functionality
   253         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3 ),
   253         //OOM_ENTRY( "Loop test with OOM", LoopTest, ETrue, 2, 3 ),
   254         //OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
   254         //OOM_FUNCENTRY( PrintTest, ETrue, 1, 3 ),
   255         };
   255         };
   256 
   256