From dc29dede345c3fec0981d678ea39beab11e05f23 Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Tue, 2 Nov 2021 16:45:40 +0000 Subject: [PATCH 1/2] Modify the variable name subscribeInfo Signed-off-by: zhaoyuan17 --- frameworks/core/include/common_event_proxy.h | 2 +- frameworks/core/include/common_event_stub.h | 2 +- frameworks/core/include/icommon_event.h | 2 +- frameworks/core/src/common_event_proxy.cpp | 6 +- frameworks/core/src/common_event_stub.cpp | 8 +- .../unittest/common_event_subscribe_test.cpp | 62 +- .../common_event_unsubscribe_test.cpp | 26 +- .../native/include/common_event_subscriber.h | 2 +- interfaces/kits/js/@ohos.commonEvent.d.ts | 4 +- .../napi/common_event/include/common_event.h | 2 +- .../napi/common_event/src/common_event.cpp | 26 +- .../include/common_event_manager_service.h | 2 +- .../ces/include/common_event_sticky_manager.h | 2 +- .../include/common_event_subscriber_manager.h | 8 +- .../ces/include/inner_common_event_manager.h | 2 +- .../ces/src/common_event_control_manager.cpp | 8 +- .../ces/src/common_event_manager_service.cpp | 4 +- .../ces/src/common_event_sticky_manager.cpp | 8 +- .../src/common_event_subscriber_manager.cpp | 32 +- .../ces/src/inner_common_event_manager.cpp | 6 +- .../common_event_services_module_test.cpp | 6 +- ...t_services_publish_ordered_module_test.cpp | 72 +-- ...ent_publish_permission_event_unit_test.cpp | 30 +- .../common_event_subscribe_unit_test.cpp | 4 +- .../actsCESCESpublishInfoTest.cpp | 6 +- .../acts/actsCESDataTest/actsCESDataTest.cpp | 574 +++++++++--------- .../actsCESManagertest/actsCESManagertest.cpp | 12 +- ...t_services_publish_ordered_system_test.cpp | 72 +-- .../common_event_services_system_test.cpp | 24 +- .../include/ces_st_permission_and_AB.h | 6 +- .../include/ces_st_permission_default_A.h | 6 +- .../include/ces_st_permission_or_AB.h | 6 +- .../include/ces_st_permission_or_AX.h | 6 +- tools/test/mock/mock_common_event_stub.cpp | 4 +- tools/test/mock/mock_common_event_stub.h | 2 +- .../common_event_command_dump_module_test.cpp | 4 +- .../common_event_command_dump_system_test.cpp | 8 +- ...mmon_event_command_publish_system_test.cpp | 16 +- .../cem/common_event_command_dump_test.cpp | 8 +- 39 files changed, 540 insertions(+), 540 deletions(-) diff --git a/frameworks/core/include/common_event_proxy.h b/frameworks/core/include/common_event_proxy.h index 1cf91608..0934b231 100644 --- a/frameworks/core/include/common_event_proxy.h +++ b/frameworks/core/include/common_event_proxy.h @@ -31,7 +31,7 @@ public: virtual bool PublishCommonEvent(const CommonEventData &event, const CommonEventPublishInfo &publishinfo, const sptr &commonEventListener, const uid_t &uid) override; virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) override; + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) override; virtual bool UnsubscribeCommonEvent(const sptr &commonEventListener) override; virtual bool GetStickyCommonEvent(const std::string &event, CommonEventData &eventData) override; virtual bool DumpState(const std::string &event, std::vector &state) override; diff --git a/frameworks/core/include/common_event_stub.h b/frameworks/core/include/common_event_stub.h index 0fdafbf2..c0c65b74 100644 --- a/frameworks/core/include/common_event_stub.h +++ b/frameworks/core/include/common_event_stub.h @@ -37,7 +37,7 @@ public: virtual bool PublishCommonEvent(const CommonEventData &event, const CommonEventPublishInfo &publishinfo, const sptr &commonEventListener, const uid_t &uid) override; virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) override; + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) override; virtual bool UnsubscribeCommonEvent(const sptr &commonEventListener) override; virtual bool GetStickyCommonEvent(const std::string &event, CommonEventData &eventData) override; virtual bool DumpState(const std::string &event, std::vector &state) override; diff --git a/frameworks/core/include/icommon_event.h b/frameworks/core/include/icommon_event.h index 140838fe..96f47711 100644 --- a/frameworks/core/include/icommon_event.h +++ b/frameworks/core/include/icommon_event.h @@ -33,7 +33,7 @@ public: virtual bool PublishCommonEvent(const CommonEventData &event, const CommonEventPublishInfo &publishinfo, const sptr &commonEventListener, const uid_t &uid) = 0; virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) = 0; + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) = 0; virtual bool UnsubscribeCommonEvent(const sptr &commonEventListener) = 0; virtual bool GetStickyCommonEvent(const std::string &event, CommonEventData &eventData) = 0; virtual bool DumpState(const std::string &event, std::vector &state) = 0; diff --git a/frameworks/core/src/common_event_proxy.cpp b/frameworks/core/src/common_event_proxy.cpp index f3e3b68f..55d46f35 100644 --- a/frameworks/core/src/common_event_proxy.cpp +++ b/frameworks/core/src/common_event_proxy.cpp @@ -101,15 +101,15 @@ bool CommonEventProxy::PublishCommonEvent(const CommonEventData &event, const Co } bool CommonEventProxy::SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) { EVENT_LOGD("start"); MessageParcel data; MessageParcel reply; - if (!data.WriteParcelable(&subscriberInfo)) { - EVENT_LOGE("Failed to write parcelable subscriberInfo"); + if (!data.WriteParcelable(&subscribeInfo)) { + EVENT_LOGE("Failed to write parcelable subscribeInfo"); return false; } if (!data.WriteParcelable(commonEventListener)) { diff --git a/frameworks/core/src/common_event_stub.cpp b/frameworks/core/src/common_event_stub.cpp index 843fbb59..7ebf5337 100644 --- a/frameworks/core/src/common_event_stub.cpp +++ b/frameworks/core/src/common_event_stub.cpp @@ -71,9 +71,9 @@ int CommonEventStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Message } case static_cast(ICommonEvent::Message::CES_SUBSCRIBE_COMMON_EVENT): { - std::unique_ptr subscriberInfo(data.ReadParcelable()); + std::unique_ptr subscribeInfo(data.ReadParcelable()); sptr commonEventListener = data.ReadParcelable(); - if (!subscriberInfo) { + if (!subscribeInfo) { EVENT_LOGE("Failed to ReadParcelable"); return ERR_INVALID_VALUE; } @@ -81,7 +81,7 @@ int CommonEventStub::OnRemoteRequest(uint32_t code, MessageParcel &data, Message EVENT_LOGE("Failed to ReadParcelable"); return ERR_INVALID_VALUE; } - bool ret = SubscribeCommonEvent(*subscriberInfo, commonEventListener); + bool ret = SubscribeCommonEvent(*subscribeInfo, commonEventListener); if (!reply.WriteBool(ret)) { EVENT_LOGE("Failed to write reply"); return ERR_INVALID_VALUE; @@ -191,7 +191,7 @@ bool CommonEventStub::PublishCommonEvent(const CommonEventData &event, const Com } bool CommonEventStub::SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) { EVENT_LOGD("called"); diff --git a/frameworks/native/test/unittest/common_event_subscribe_test.cpp b/frameworks/native/test/unittest/common_event_subscribe_test.cpp index 9a1931c9..0aa907e2 100644 --- a/frameworks/native/test/unittest/common_event_subscribe_test.cpp +++ b/frameworks/native/test/unittest/common_event_subscribe_test.cpp @@ -102,7 +102,7 @@ public: } virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const OHOS::sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const OHOS::sptr &commonEventListener) { return false; } @@ -154,8 +154,8 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_001, TestSize.Level1) /* Subscribe */ MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool subscribeResult = CommonEventManager::SubscribeCommonEvent(subscriber); EXPECT_EQ(true, subscribeResult); @@ -214,9 +214,9 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_002, TestSize.Level1) { MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscribera = std::make_shared(subscriberInfo); - std::shared_ptr subscriberb = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscribera = std::make_shared(subscribeInfo); + std::shared_ptr subscriberb = std::make_shared(subscribeInfo); bool subscribeResulta = CommonEventManager::SubscribeCommonEvent(subscribera); @@ -256,8 +256,8 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_003, TestSize.Level1) HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_004, TestSize.Level1) { MatchingSkills matchingSkills; - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool subscribeResult = CommonEventManager::SubscribeCommonEvent(subscriber); @@ -277,8 +277,8 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_005, TestSize.Level1) { MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); CommonEventManager::SubscribeCommonEvent(subscriber); @@ -322,11 +322,11 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_007, TestSize.Level1) CommonEventStubTest CommonEventStubTest; MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); OHOS::MessageParcel data, reply; OHOS::MessageOption option; - data.WriteParcelable(&subscriberInfo); + data.WriteParcelable(&subscribeInfo); int subscribeResult = CommonEventStubTest.OnRemoteRequest( static_cast(ICommonEvent::Message::CES_SUBSCRIBE_COMMON_EVENT), data, reply, option); @@ -348,11 +348,11 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_008, TestSize.Level1) CommonEventStubTest CommonEventStubTest; MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); OHOS::MessageParcel data, reply; OHOS::MessageOption option; - data.WriteParcelable(&subscriberInfo); + data.WriteParcelable(&subscribeInfo); int subscribeResult = CommonEventStubTest.OnRemoteRequest(static_cast(-1), data, reply, option); @@ -373,13 +373,13 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_009, TestSize.Level1) { MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); std::shared_ptr innerCommonEventManager = std::make_shared(); OHOS::sptr sp(nullptr); struct tm curTime; - EXPECT_EQ(false, innerCommonEventManager->SubscribeCommonEvent(subscriberInfo, sp, curTime, 0, 0, "")); + EXPECT_EQ(false, innerCommonEventManager->SubscribeCommonEvent(subscribeInfo, sp, curTime, 0, 0, "")); } /* @@ -396,8 +396,8 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_010, TestSize.Level1) { MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); OHOS::sptr commonEventListener = new CommonEventListener(subscriber); std::shared_ptr innerCommonEventManager = std::make_shared(); OHOS::sptr commonEventListenerPtr(commonEventListener); @@ -424,9 +424,9 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_011, TestSize.Level1) { MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENT); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); std::shared_ptr commonEventSubscribeInfo = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); struct tm curTime{0}; @@ -449,10 +449,10 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_011, TestSize.Level1) HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_012, TestSize.Level1) { MatchingSkills matchingSkills; - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); std::shared_ptr commonEventSubscribeInfo = - std::make_shared(subscriberInfo); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); OHOS::sptr commonEventListener = new CommonEventListener(subscriber); std::shared_ptr innerCommonEventManager = std::make_shared(); OHOS::sptr commonEventListenerSp(commonEventListener); @@ -495,10 +495,10 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_013, TestSize.Level1) HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_014, TestSize.Level1) { MatchingSkills matchingSkills; - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); std::shared_ptr commonEventSubscribeInfo = - std::make_shared(subscriberInfo); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); CommonEventListener commonEventListener(subscriber); commonEventListener.runner_ = nullptr; @@ -518,10 +518,10 @@ HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_014, TestSize.Level1) HWTEST_F(CommonEventSubscribeTest, CommonEventSubscribe_015, TestSize.Level1) { MatchingSkills matchingSkills; - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); std::shared_ptr commonEventSubscribeInfo = - std::make_shared(subscriberInfo); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); CommonEventListener commonEventListener(subscriber); commonEventListener.handler_ = nullptr; diff --git a/frameworks/native/test/unittest/common_event_unsubscribe_test.cpp b/frameworks/native/test/unittest/common_event_unsubscribe_test.cpp index 14a41bd2..d9a87719 100644 --- a/frameworks/native/test/unittest/common_event_unsubscribe_test.cpp +++ b/frameworks/native/test/unittest/common_event_unsubscribe_test.cpp @@ -76,7 +76,7 @@ public: } virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const OHOS::sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const OHOS::sptr &commonEventListener) { return false; } @@ -151,8 +151,8 @@ void CommonEventUnSubscribeTest::SetMatchingSkillsWithScheme(const std::string & HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_001, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); std::shared_ptr helper; EXPECT_EQ(true, helper->UnSubscribeCommonEvent(subscriber)); } @@ -168,8 +168,8 @@ HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_001, TestSize.Level1) HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_002, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); EXPECT_EQ(true, DelayedSingleton::GetInstance()->UnSubscribeCommonEvent(subscriber)); } @@ -184,8 +184,8 @@ HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_002, TestSize.Level1) HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_003, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); DelayedSingleton::GetInstance()->SubscribeCommonEvent(subscriber); EXPECT_EQ(true, DelayedSingleton::GetInstance()->UnSubscribeCommonEvent(subscriber)); } @@ -201,8 +201,8 @@ HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_003, TestSize.Level1) HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_004, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); sptr commonEventListener = new CommonEventListener(subscriber); std::shared_ptr innerCommonEventManager = std::make_shared(); EXPECT_EQ(true, innerCommonEventManager->UnsubscribeCommonEvent(commonEventListener)); @@ -219,8 +219,8 @@ HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_004, TestSize.Level1) HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_005, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); sptr commonEventListener = new CommonEventListener(subscriber); EXPECT_EQ( ERR_OK, DelayedSingleton::GetInstance()->RemoveSubscriber(commonEventListener)); @@ -321,9 +321,9 @@ HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_010, TestSize.Level1) HWTEST_F(CommonEventUnSubscribeTest, UnSubscribe_011, TestSize.Level1) { CommonEventUnSubscribeTest::SetMatchingSkillsWithEvent("event"); - CommonEventSubscribeInfo subscriberInfo(matchingSkills_); + CommonEventSubscribeInfo subscribeInfo(matchingSkills_); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); OHOS::sptr commonEventListener = new CommonEventListener(subscriberTest); DelayedSingleton::GetInstance()->death_ = nullptr; EXPECT_EQ( diff --git a/interfaces/innerkits/native/include/common_event_subscriber.h b/interfaces/innerkits/native/include/common_event_subscriber.h index c51d11ef..0a74a0d1 100644 --- a/interfaces/innerkits/native/include/common_event_subscriber.h +++ b/interfaces/innerkits/native/include/common_event_subscriber.h @@ -34,7 +34,7 @@ public: * A constructor used to create a CommonEventSubscriber instance with the * subscribeInfo parameter passed. * - * @param subscriberInfo the subscriberInfo + * @param subscribeInfo the subscribeInfo */ explicit CommonEventSubscriber(const CommonEventSubscribeInfo &subscribeInfo); diff --git a/interfaces/kits/js/@ohos.commonEvent.d.ts b/interfaces/kits/js/@ohos.commonEvent.d.ts index 2c57934e..e10a421e 100644 --- a/interfaces/kits/js/@ohos.commonEvent.d.ts +++ b/interfaces/kits/js/@ohos.commonEvent.d.ts @@ -47,7 +47,7 @@ declare namespace commonEvent { /** - * create the CommonEventSubscriber for the SubscriberInfo. + * create the CommonEventSubscriber for the SubscribeInfo. * * @since 7 * @param subscribeInfo Indicate the information of the subscriber. @@ -57,7 +57,7 @@ declare namespace commonEvent { function createSubscriber(subscribeInfo: CommonEventSubscribeInfo, callback: AsyncCallback): void; /** - * create the CommonEventSubscriber for the SubscriberInfo. + * create the CommonEventSubscriber for the SubscribeInfo. * * @since 7 * @param subscribeInfo Indicate the information of the subscriber. diff --git a/interfaces/kits/napi/common_event/include/common_event.h b/interfaces/kits/napi/common_event/include/common_event.h index a8ceb2a0..b1ee8b01 100644 --- a/interfaces/kits/napi/common_event/include/common_event.h +++ b/interfaces/kits/napi/common_event/include/common_event.h @@ -190,7 +190,7 @@ struct AsyncCallbackInfoCreate { napi_async_work asyncWork; napi_ref callback = nullptr; napi_deferred deferred = nullptr; - napi_ref subscriberInfo = nullptr; + napi_ref subscribeInfo = nullptr; bool isCallback = false; napi_value result = nullptr; }; diff --git a/interfaces/kits/napi/common_event/src/common_event.cpp b/interfaces/kits/napi/common_event/src/common_event.cpp index f2a36bb7..d6909589 100644 --- a/interfaces/kits/napi/common_event/src/common_event.cpp +++ b/interfaces/kits/napi/common_event/src/common_event.cpp @@ -279,7 +279,7 @@ napi_value CreateSubscriber(napi_env env, napi_callback_info info) } AsyncCallbackInfoCreate *asyncCallbackInfo = - new (std::nothrow) AsyncCallbackInfoCreate {.env = env, .asyncWork = nullptr, .subscriberInfo = nullptr}; + new (std::nothrow) AsyncCallbackInfoCreate {.env = env, .asyncWork = nullptr, .subscribeInfo = nullptr}; if (asyncCallbackInfo == nullptr) { EVENT_LOGE("asyncCallbackInfo is null"); return NapiGetNull(env); @@ -288,7 +288,7 @@ napi_value CreateSubscriber(napi_env env, napi_callback_info info) PaddingAsyncCallbackInfoCreateSubscriber(env, argc, asyncCallbackInfo, callback, promise); - napi_create_reference(env, argv[0], 1, &asyncCallbackInfo->subscriberInfo); + napi_create_reference(env, argv[0], 1, &asyncCallbackInfo->subscribeInfo); napi_value resourceName = nullptr; napi_create_string_latin1(env, "CreateSubscriber", NAPI_AUTO_LENGTH, &resourceName); @@ -303,11 +303,11 @@ napi_value CreateSubscriber(napi_env env, napi_callback_info info) AsyncCallbackInfoCreate *asyncCallbackInfo = (AsyncCallbackInfoCreate *)data; napi_value constructor = nullptr; - napi_value subscriberInfoRefValue = nullptr; - napi_get_reference_value(env, asyncCallbackInfo->subscriberInfo, &subscriberInfoRefValue); + napi_value subscribeInfoRefValue = nullptr; + napi_get_reference_value(env, asyncCallbackInfo->subscribeInfo, &subscribeInfoRefValue); napi_get_reference_value(env, g_CommonEventSubscriber, &constructor); - napi_new_instance(env, constructor, 1, &subscriberInfoRefValue, &asyncCallbackInfo->result); + napi_new_instance(env, constructor, 1, &subscribeInfoRefValue, &asyncCallbackInfo->result); ReturnCallbackPromise(env, asyncCallbackInfo->isCallback, @@ -318,8 +318,8 @@ napi_value CreateSubscriber(napi_env env, napi_callback_info info) if (asyncCallbackInfo->callback != nullptr) { napi_delete_reference(env, asyncCallbackInfo->callback); } - if (asyncCallbackInfo->subscriberInfo != nullptr) { - napi_delete_reference(env, asyncCallbackInfo->subscriberInfo); + if (asyncCallbackInfo->subscribeInfo != nullptr) { + napi_delete_reference(env, asyncCallbackInfo->subscribeInfo); } napi_delete_async_work(env, asyncCallbackInfo->asyncWork); if (asyncCallbackInfo) { @@ -2321,7 +2321,7 @@ napi_value GetEventsByCreateSubscriber(const napi_env &env, const napi_value &ar EVENT_LOGI("GetEventsByCreateSubscriber str = %{public}s", str); events.push_back(str); } - + return NapiGetNull(env); } @@ -2432,20 +2432,20 @@ napi_value CommonEventSubscriberConstructor(napi_env env, napi_callback_info inf matchingSkills.AddEvent(event); } - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); if (hasPermission) { - subscriberInfo.SetPermission(permission); + subscribeInfo.SetPermission(permission); } if (hasPublisherDeviceId) { - subscriberInfo.SetDeviceId(publisherDeviceId); + subscribeInfo.SetDeviceId(publisherDeviceId); } if (hasPriority) { - subscriberInfo.SetPriority(priority); + subscribeInfo.SetPriority(priority); } - SubscriberInstance *objectInfo = new (std::nothrow) SubscriberInstance(subscriberInfo); + SubscriberInstance *objectInfo = new (std::nothrow) SubscriberInstance(subscribeInfo); if (objectInfo == nullptr) { EVENT_LOGE("objectInfo is null"); return NapiGetNull(env); diff --git a/services/ces/include/common_event_manager_service.h b/services/ces/include/common_event_manager_service.h index 4d5f8560..9abcf863 100644 --- a/services/ces/include/common_event_manager_service.h +++ b/services/ces/include/common_event_manager_service.h @@ -41,7 +41,7 @@ public: const sptr &commonEventListener, const uid_t &uid) override; virtual bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) override; + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) override; virtual bool UnsubscribeCommonEvent(const sptr &commonEventListener) override; diff --git a/services/ces/include/common_event_sticky_manager.h b/services/ces/include/common_event_sticky_manager.h index 3a0e34bc..c3a842e1 100644 --- a/services/ces/include/common_event_sticky_manager.h +++ b/services/ces/include/common_event_sticky_manager.h @@ -34,7 +34,7 @@ public: using CommonEventPublishInfoPtr = std::shared_ptr; using SubscribeInfoPtr = std::shared_ptr; - int FindStickyEvents(const SubscribeInfoPtr &subscriberInfo, std::vector &commonEventRecords); + int FindStickyEvents(const SubscribeInfoPtr &subscribeInfo, std::vector &commonEventRecords); bool GetStickyCommonEvent(const std::string &event, CommonEventData &eventData); diff --git a/services/ces/include/common_event_subscriber_manager.h b/services/ces/include/common_event_subscriber_manager.h index 8a669e1d..85cf9217 100644 --- a/services/ces/include/common_event_subscriber_manager.h +++ b/services/ces/include/common_event_subscriber_manager.h @@ -32,7 +32,7 @@ namespace OHOS { namespace EventFwk { struct EventSubscriberRecord { - std::shared_ptr eventSubscriberInfo; + std::shared_ptr eventSubscribeInfo; sptr commonEventListener; struct tm recordTime; pid_t pid; @@ -42,7 +42,7 @@ struct EventSubscriberRecord { int64_t freezeTime; EventSubscriberRecord() - : eventSubscriberInfo(nullptr), commonEventListener(nullptr), pid(0), uid(0), isFreeze(false), freezeTime(0) + : eventSubscribeInfo(nullptr), commonEventListener(nullptr), pid(0), uid(0), isFreeze(false), freezeTime(0) {} }; @@ -56,7 +56,7 @@ struct FrozenEventRecord { inline bool operator<(const std::shared_ptr &a, const std::shared_ptr &b) { - return a->eventSubscriberInfo->GetPriority() > b->eventSubscriberInfo->GetPriority(); + return a->eventSubscribeInfo->GetPriority() > b->eventSubscribeInfo->GetPriority(); } using SubscriberRecordPtr = std::shared_ptr; @@ -69,7 +69,7 @@ public: virtual ~CommonEventSubscriberManager() override; - int InsertSubscriber(const SubscribeInfoPtr &eventSubscriberInfo, const sptr &commonEventListener, + int InsertSubscriber(const SubscribeInfoPtr &eventSubscribeInfo, const sptr &commonEventListener, const struct tm &recordTime, const pid_t &pid, const uid_t &uid, const std::string &bundleName); int RemoveSubscriber(const sptr &commonEventListener); diff --git a/services/ces/include/inner_common_event_manager.h b/services/ces/include/inner_common_event_manager.h index d26801db..1b1eecf9 100644 --- a/services/ces/include/inner_common_event_manager.h +++ b/services/ces/include/inner_common_event_manager.h @@ -31,7 +31,7 @@ public: const sptr &commonEventListener, const struct tm &recordTime, const pid_t &pid, const uid_t &uid, const std::string &bundleName); - bool SubscribeCommonEvent(const CommonEventSubscribeInfo &subscriberInfo, + bool SubscribeCommonEvent(const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener, const struct tm &recordTime, const pid_t &pid, const uid_t &uid, const std::string &bundleName); diff --git a/services/ces/src/common_event_control_manager.cpp b/services/ces/src/common_event_control_manager.cpp index 284953af..f0307fe7 100644 --- a/services/ces/src/common_event_control_manager.cpp +++ b/services/ces/src/common_event_control_manager.cpp @@ -320,9 +320,9 @@ void CommonEventControlManager::EnqueueHistoryEventRecord(const std::shared_ptr< HistorySubscriberRecord receiver; receiver.recordTime = vec->recordTime; receiver.bundleName = vec->bundleName; - receiver.priority = vec->eventSubscriberInfo->GetPriority(); - receiver.permission = vec->eventSubscriberInfo->GetPermission(); - receiver.deviceId = vec->eventSubscriberInfo->GetDeviceId(); + receiver.priority = vec->eventSubscribeInfo->GetPriority(); + receiver.permission = vec->eventSubscribeInfo->GetPermission(); + receiver.deviceId = vec->eventSubscribeInfo->GetDeviceId(); receiver.isFreeze = vec->isFreeze; receiver.freezeTime = vec->freezeTime; record.receivers.emplace_back(receiver); @@ -651,7 +651,7 @@ int CommonEventControlManager::CheckPermission( bool skip = false; bool ret = false; - std::string subscriberRequiredPermission = subscriberRecord.eventSubscriberInfo->GetPermission(); + std::string subscriberRequiredPermission = subscriberRecord.eventSubscribeInfo->GetPermission(); std::vector publisherRequiredPermissions = eventRecord.publishInfo->GetSubscriberPermissions(); Permission per = DelayedSingleton::GetInstance()->GetEventPermission( diff --git a/services/ces/src/common_event_manager_service.cpp b/services/ces/src/common_event_manager_service.cpp index 24c7165d..db1f108f 100644 --- a/services/ces/src/common_event_manager_service.cpp +++ b/services/ces/src/common_event_manager_service.cpp @@ -186,7 +186,7 @@ bool CommonEventManagerService::PublishCommonEventDetailed(const CommonEventData } bool CommonEventManagerService::SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) { EVENT_LOGI("enter"); @@ -205,7 +205,7 @@ bool CommonEventManagerService::SubscribeCommonEvent( std::function SubscribeCommonEventFunc = std::bind(&InnerCommonEventManager::SubscribeCommonEvent, innerCommonEventManager_, - subscriberInfo, + subscribeInfo, commonEventListener, recordTime, callingPid, diff --git a/services/ces/src/common_event_sticky_manager.cpp b/services/ces/src/common_event_sticky_manager.cpp index ad475296..8a85b257 100644 --- a/services/ces/src/common_event_sticky_manager.cpp +++ b/services/ces/src/common_event_sticky_manager.cpp @@ -20,16 +20,16 @@ namespace OHOS { namespace EventFwk { int CommonEventStickyManager::FindStickyEvents( - const SubscribeInfoPtr &subscriberInfo, std::vector &commonEventRecords) + const SubscribeInfoPtr &subscribeInfo, std::vector &commonEventRecords) { EVENT_LOGI("enter"); - if (subscriberInfo == nullptr) { - EVENT_LOGE("subscriberInfo is null"); + if (subscribeInfo == nullptr) { + EVENT_LOGE("subscribeInfo is null"); return ERR_INVALID_VALUE; } - auto events = subscriberInfo->GetMatchingSkills().GetEvents(); + auto events = subscribeInfo->GetMatchingSkills().GetEvents(); if (events.size() == 0) { EVENT_LOGW("No subscribed events"); return ERR_INVALID_VALUE; diff --git a/services/ces/src/common_event_subscriber_manager.cpp b/services/ces/src/common_event_subscriber_manager.cpp index 0b575f5f..06fb1ea8 100644 --- a/services/ces/src/common_event_subscriber_manager.cpp +++ b/services/ces/src/common_event_subscriber_manager.cpp @@ -35,14 +35,14 @@ CommonEventSubscriberManager::~CommonEventSubscriberManager() EVENT_LOGI("CommonEventSubscriberManager instance destoryed"); } -int CommonEventSubscriberManager::InsertSubscriber(const SubscribeInfoPtr &eventSubscriberInfo, +int CommonEventSubscriberManager::InsertSubscriber(const SubscribeInfoPtr &eventSubscribeInfo, const sptr &commonEventListener, const struct tm &recordTime, const pid_t &pid, const uid_t &uid, const std::string &bundleName) { EVENT_LOGI("enter"); - if (eventSubscriberInfo == nullptr) { - EVENT_LOGE("eventSubscriberInfo is null"); + if (eventSubscribeInfo == nullptr) { + EVENT_LOGE("eventSubscribeInfo is null"); return ERR_INVALID_VALUE; } @@ -51,7 +51,7 @@ int CommonEventSubscriberManager::InsertSubscriber(const SubscribeInfoPtr &event return ERR_INVALID_VALUE; } - std::vector events = eventSubscriberInfo->GetMatchingSkills().GetEvents(); + std::vector events = eventSubscribeInfo->GetMatchingSkills().GetEvents(); if (events.size() <= 0) { EVENT_LOGE("No subscribed events"); return ERR_INVALID_VALUE; @@ -63,7 +63,7 @@ int CommonEventSubscriberManager::InsertSubscriber(const SubscribeInfoPtr &event return ERR_INVALID_VALUE; } - record->eventSubscriberInfo = eventSubscriberInfo; + record->eventSubscribeInfo = eventSubscribeInfo; record->commonEventListener = commonEventListener; record->recordTime = recordTime; record->pid = pid; @@ -115,41 +115,41 @@ void CommonEventSubscriberManager::DumpDetailed( std::string pid = format + "PID: " + std::to_string(record->pid) + "\n"; std::string uid = format + "UID: " + std::to_string(record->uid) + "\n"; std::string bundleName = format + "BundleName: " + record->bundleName + "\n"; - std::string priority = format + "Priority: " + std::to_string(record->eventSubscriberInfo->GetPriority()) + "\n"; - std::string permission = format + "Permission: " + record->eventSubscriberInfo->GetPermission() + "\n"; - std::string deviceId = format + "DevicedID: " + record->eventSubscriberInfo->GetDeviceId() + "\n"; + std::string priority = format + "Priority: " + std::to_string(record->eventSubscribeInfo->GetPriority()) + "\n"; + std::string permission = format + "Permission: " + record->eventSubscribeInfo->GetPermission() + "\n"; + std::string deviceId = format + "DevicedID: " + record->eventSubscribeInfo->GetDeviceId() + "\n"; std::string events = format + "\tEvent: "; std::string separator; - for (int eventNum = 0; eventNum < record->eventSubscriberInfo->GetMatchingSkills().CountEvent(); ++eventNum) { + for (int eventNum = 0; eventNum < record->eventSubscribeInfo->GetMatchingSkills().CountEvent(); ++eventNum) { if (eventNum == 0) { separator = ""; } else { separator = ", "; } - events = events + separator + record->eventSubscriberInfo->GetMatchingSkills().GetEvent(eventNum); + events = events + separator + record->eventSubscribeInfo->GetMatchingSkills().GetEvent(eventNum); } events = events + "\n"; std::string entities = format + "\tEntity: "; - for (int entityNum = 0; entityNum < record->eventSubscriberInfo->GetMatchingSkills().CountEntities(); ++entityNum) { + for (int entityNum = 0; entityNum < record->eventSubscribeInfo->GetMatchingSkills().CountEntities(); ++entityNum) { if (entityNum == 0) { separator = ""; } else { separator = ", "; } - entities = entities + separator + record->eventSubscriberInfo->GetMatchingSkills().GetEntity(entityNum); + entities = entities + separator + record->eventSubscribeInfo->GetMatchingSkills().GetEntity(entityNum); } entities = entities + "\n"; std::string scheme = format + "\tScheme: "; - for (int schemeNum = 0; schemeNum < record->eventSubscriberInfo->GetMatchingSkills().CountSchemes(); ++schemeNum) { + for (int schemeNum = 0; schemeNum < record->eventSubscribeInfo->GetMatchingSkills().CountSchemes(); ++schemeNum) { if (schemeNum == 0) { separator = ""; } else { separator = ", "; } - scheme = scheme + separator + record->eventSubscriberInfo->GetMatchingSkills().GetScheme(schemeNum); + scheme = scheme + separator + record->eventSubscribeInfo->GetMatchingSkills().GetScheme(schemeNum); } scheme = scheme + "\n"; @@ -243,7 +243,7 @@ int CommonEventSubscriberManager::RemoveSubscriberRecordLocked(const sptrcommonEventListener) { RemoveFrozenEventsBySubscriber((*it)); (*it)->commonEventListener = nullptr; - events = (*it)->eventSubscriberInfo->GetMatchingSkills().GetEvents(); + events = (*it)->eventSubscribeInfo->GetMatchingSkills().GetEvents(); subscribers_.erase(it); break; } @@ -281,7 +281,7 @@ void CommonEventSubscriberManager::GetSubscriberRecordsByWantLocked( std::multiset subscriberRecords = recordsItem->second; for (auto it = subscriberRecords.begin(); it != subscriberRecords.end(); it++) { - if ((*it)->eventSubscriberInfo->GetMatchingSkills().Match(want)) { + if ((*it)->eventSubscribeInfo->GetMatchingSkills().Match(want)) { records.emplace_back(*it); } } diff --git a/services/ces/src/inner_common_event_manager.cpp b/services/ces/src/inner_common_event_manager.cpp index ed34c47d..10a6d70b 100644 --- a/services/ces/src/inner_common_event_manager.cpp +++ b/services/ces/src/inner_common_event_manager.cpp @@ -90,13 +90,13 @@ bool InnerCommonEventManager::PublishCommonEvent(const CommonEventData &data, co return true; } -bool InnerCommonEventManager::SubscribeCommonEvent(const CommonEventSubscribeInfo &subscriberInfo, +bool InnerCommonEventManager::SubscribeCommonEvent(const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener, const struct tm &recordTime, const pid_t &pid, const uid_t &uid, const std::string &bundleName) { EVENT_LOGI("enter"); - if (subscriberInfo.GetMatchingSkills().CountEvent() == 0) { + if (subscribeInfo.GetMatchingSkills().CountEvent() == 0) { EVENT_LOGE("the subscriber has no event"); return false; } @@ -105,7 +105,7 @@ bool InnerCommonEventManager::SubscribeCommonEvent(const CommonEventSubscribeInf return false; } - std::shared_ptr sp = std::make_shared(subscriberInfo); + std::shared_ptr sp = std::make_shared(subscribeInfo); DelayedSingleton::GetInstance()->InsertSubscriber( sp, commonEventListener, recordTime, pid, uid, bundleName); diff --git a/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp b/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp index dd9ef49a..13a27051 100755 --- a/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp +++ b/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp @@ -45,14 +45,14 @@ std::shared_ptr handlerPtr; class CommonEventServicesModuleTest : public CommonEventSubscriber { public: - CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesModuleTest(){}; virtual void OnReceiveEvent(const CommonEventData &data); public: }; -CommonEventServicesModuleTest::CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +CommonEventServicesModuleTest::CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesModuleTest::OnReceiveEvent(const CommonEventData &data) diff --git a/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp b/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp index c341f667..29778ae3 100644 --- a/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp +++ b/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp @@ -91,7 +91,7 @@ public: class Subscriber : public CommonEventSubscriber { public: - explicit Subscriber(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo){}; + explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; ~Subscriber() {} @@ -116,7 +116,7 @@ public: class SubscriberTest : public CommonEventSubscriber { public: - explicit SubscriberTest(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo){}; + explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; ~SubscriberTest() {} @@ -257,8 +257,8 @@ private: class SubscriberAnotherTest : public CommonEventSubscriber { public: - explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo){}; + explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo){}; ~SubscriberAnotherTest() {} @@ -431,10 +431,10 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_01 matchingSkills.AddEvent(EVENTCASE1); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -445,11 +445,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_01 matchingSkillsAnother.AddEvent(EVENTCASE1); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -475,7 +475,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_01 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -548,11 +548,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_02 matchingSkills.AddEvent(EVENTCASE2); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -563,12 +563,12 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_02 matchingSkillsAnother.AddEvent(EVENTCASE2); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); - subscriberInfoAnother.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); + subscribeInfoAnother.SetPriority(HIGHPRIORITY); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -593,7 +593,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_02 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -665,10 +665,10 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_03 matchingSkills.AddEvent(EVENTCASE3); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -679,11 +679,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_03 matchingSkillsAnother.AddEvent(EVENTCASE3); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -709,7 +709,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_03 g_mtxAnother.lock(); // publish ordered event - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); EXPECT_EQ(true, publishResult); @@ -777,10 +777,10 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_04 matchingSkills.AddEvent(EVENTCASE4); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -791,11 +791,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_04 matchingSkillsAnother.AddEvent(EVENTCASE4); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -820,7 +820,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_04 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -890,10 +890,10 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_05 matchingSkills.AddEvent(EVENTCASE5); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -904,11 +904,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_05 matchingSkillsAnother.AddEvent(EVENTCASE5); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -934,7 +934,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_05 g_mtxAnother.lock(); // publish ordered event - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); EXPECT_EQ(true, publishResult); @@ -1004,10 +1004,10 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_06 matchingSkills.AddEvent(EVENTCASE6); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -1018,11 +1018,11 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_06 matchingSkillsAnother.AddEvent(EVENTCASE6); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -1047,7 +1047,7 @@ HWTEST_F(CesPublishOrderedEventModuleTest, CommonEventPublishOrderedEventTest_06 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); diff --git a/services/test/unittest/common_event_publish_permission_event_unit_test.cpp b/services/test/unittest/common_event_publish_permission_event_unit_test.cpp index 0cc64118..f3106658 100644 --- a/services/test/unittest/common_event_publish_permission_event_unit_test.cpp +++ b/services/test/unittest/common_event_publish_permission_event_unit_test.cpp @@ -272,7 +272,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -313,7 +313,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -354,7 +354,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; CommonEventPublishInfo commonEventPublishInfo; commonEventPublishInfo.SetSubscriberPermissions(std::vector()); @@ -393,7 +393,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -433,7 +433,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello world"; CommonEventPublishInfo commonEventPublishInfo; @@ -473,7 +473,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -515,7 +515,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello world"; CommonEventPublishInfo commonEventPublishInfo; @@ -557,7 +557,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -599,7 +599,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello world"; CommonEventPublishInfo commonEventPublishInfo; @@ -689,7 +689,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -729,7 +729,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -769,7 +769,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -809,7 +809,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -849,7 +849,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; @@ -889,7 +889,7 @@ HWTEST_F(CommonEventPublishPermissionEventUnitTest, CommonEventPublishPermission std::shared_ptr commonEventSubscribeInfoSptr = std::make_shared(commonEventSubscribeInfo); EventSubscriberRecord eventSubRecord; - eventSubRecord.eventSubscriberInfo = commonEventSubscribeInfoSptr; + eventSubRecord.eventSubscribeInfo = commonEventSubscribeInfoSptr; eventSubRecord.bundleName = "hello"; CommonEventPublishInfo commonEventPublishInfo; diff --git a/services/test/unittest/common_event_subscribe_unit_test.cpp b/services/test/unittest/common_event_subscribe_unit_test.cpp index 01aee5c2..4d0ac46a 100644 --- a/services/test/unittest/common_event_subscribe_unit_test.cpp +++ b/services/test/unittest/common_event_subscribe_unit_test.cpp @@ -410,7 +410,7 @@ HWTEST_F(CommonEventSubscribeUnitTest, CommonEventSubscribeUnitTest_1000, Functi // make record struct tm recordTime{0}; auto record = std::make_shared(); - record->eventSubscriberInfo = std::make_shared(subscribeInfo); + record->eventSubscribeInfo = std::make_shared(subscribeInfo); record->commonEventListener = commonEventListenerPtr; record->recordTime = recordTime; record->pid = 0; @@ -447,7 +447,7 @@ HWTEST_F(CommonEventSubscribeUnitTest, CommonEventSubscribeUnitTest_1100, Functi // make record struct tm recordTime{0}; auto record = std::make_shared(); - record->eventSubscriberInfo = std::make_shared(subscribeInfo); + record->eventSubscribeInfo = std::make_shared(subscribeInfo); record->commonEventListener = commonEventListenerPtr; record->recordTime = recordTime; record->pid = 0; diff --git a/test/systemtest/common/acts/actsCESCESpublishInfoTest/actsCESCESpublishInfoTest.cpp b/test/systemtest/common/acts/actsCESCESpublishInfoTest/actsCESCESpublishInfoTest.cpp index b600c118..ce31bd35 100644 --- a/test/systemtest/common/acts/actsCESCESpublishInfoTest/actsCESCESpublishInfoTest.cpp +++ b/test/systemtest/common/acts/actsCESCESpublishInfoTest/actsCESCESpublishInfoTest.cpp @@ -31,13 +31,13 @@ namespace EventFwk { class ActsCommonEventServicesSystemTest : public CommonEventSubscriber { public: - explicit ActsCommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo); + explicit ActsCommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo); virtual ~ActsCommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; -ActsCommonEventServicesSystemTest::ActsCommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +ActsCommonEventServicesSystemTest::ActsCommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void ActsCommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) diff --git a/test/systemtest/common/acts/actsCESDataTest/actsCESDataTest.cpp b/test/systemtest/common/acts/actsCESDataTest/actsCESDataTest.cpp index e61c0714..4429fd1d 100755 --- a/test/systemtest/common/acts/actsCESDataTest/actsCESDataTest.cpp +++ b/test/systemtest/common/acts/actsCESDataTest/actsCESDataTest.cpp @@ -164,7 +164,7 @@ public: class SubscriberFirstTest : public CommonEventSubscriber { public: - explicit SubscriberFirstTest(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo) + explicit SubscriberFirstTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) {} ~SubscriberFirstTest() @@ -375,8 +375,8 @@ private: class SubscriberSecondTest : public CommonEventSubscriber { public: - explicit SubscriberSecondTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) + explicit SubscriberSecondTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} ~SubscriberSecondTest() @@ -535,7 +535,7 @@ private: class SubscriberThirdTest : public CommonEventSubscriber { public: - explicit SubscriberThirdTest(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo) + explicit SubscriberThirdTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) {} ~SubscriberThirdTest() @@ -694,8 +694,8 @@ private: class SubscriberPublishTest : public CommonEventSubscriber { public: - explicit SubscriberPublishTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) + explicit SubscriberPublishTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} ~SubscriberPublishTest() @@ -733,9 +733,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0100, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -743,10 +743,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0100, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -754,10 +754,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0100, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -777,7 +777,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0100, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -799,9 +799,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0200, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -809,10 +809,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0200, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -820,10 +820,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0200, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -843,7 +843,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0200, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -865,10 +865,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0300, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -876,11 +876,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0300, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -888,11 +888,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0300, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -912,7 +912,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0300, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -934,10 +934,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0400, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -945,11 +945,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0400, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -957,11 +957,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0400, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -981,7 +981,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0400, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1003,10 +1003,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0500, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1014,11 +1014,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0500, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1026,11 +1026,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0500, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1050,7 +1050,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0500, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1072,9 +1072,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0600, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1082,10 +1082,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0600, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1093,10 +1093,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0600, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1116,7 +1116,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0600, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1138,10 +1138,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0700, Function | MediumTe MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1149,11 +1149,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0700, Function | MediumTe MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1161,11 +1161,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0700, Function | MediumTe MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1185,7 +1185,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeData_0700, Function | MediumTe publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1398,9 +1398,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0100, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1408,10 +1408,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0100, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1419,10 +1419,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0100, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1439,7 +1439,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0100, Function | publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1458,9 +1458,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0200, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1468,10 +1468,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0200, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1479,10 +1479,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0200, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1499,7 +1499,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0200, Function | publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1518,9 +1518,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0300, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1528,10 +1528,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0300, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1539,10 +1539,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0300, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1559,7 +1559,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0300, Function | publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1578,9 +1578,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0400, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1588,10 +1588,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0400, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1599,10 +1599,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0400, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1619,7 +1619,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0400, Function | publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1638,9 +1638,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0500, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1648,10 +1648,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0500, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1659,10 +1659,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0500, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1679,7 +1679,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0500, Function | publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -1698,9 +1698,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0600, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE13); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1708,10 +1708,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0600, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE13); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1719,10 +1719,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0600, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE13); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1759,9 +1759,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0700, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE14); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1769,10 +1769,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0700, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE14); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1780,10 +1780,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0700, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE14); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1820,9 +1820,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0800, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE15); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1830,10 +1830,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0800, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE15); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1841,10 +1841,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0800, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE15); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1881,9 +1881,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0900, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE16); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1891,10 +1891,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0900, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE16); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1902,10 +1902,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_0900, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE16); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -1942,9 +1942,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1000, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE17); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -1952,10 +1952,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1000, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE17); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -1963,10 +1963,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1000, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE17); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2003,9 +2003,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1100, Function | MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE18); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2013,10 +2013,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1100, Function | MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE18); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2024,10 +2024,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEvent_1100, Function | MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE18); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2064,9 +2064,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0100, Function MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2074,10 +2074,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0100, Function MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2085,10 +2085,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0100, Function MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2105,7 +2105,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0100, Function publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(2); EXPECT_TRUE(publishResult); @@ -2124,9 +2124,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0200, Function MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2134,10 +2134,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0200, Function MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2145,10 +2145,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0200, Function MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2165,7 +2165,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0200, Function publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -2184,9 +2184,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0300, Function MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2194,10 +2194,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0300, Function MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2205,10 +2205,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0300, Function MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2225,7 +2225,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0300, Function publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -2244,9 +2244,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0400, Function MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2254,10 +2254,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0400, Function MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2265,10 +2265,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0400, Function MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2285,7 +2285,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0400, Function publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -2304,9 +2304,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0500, Function MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2314,10 +2314,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0500, Function MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2325,10 +2325,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0500, Function MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2345,7 +2345,7 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsync_0500, Function publishInfo.SetOrdered(true); std::shared_ptr subscriberPublishTest = - std::make_shared(subscriberInfo); + std::make_shared(subscribeInfo); bool publishResult = CommonEventManager::PublishCommonEvent(data, publishInfo, subscriberPublishTest); Delay(1); EXPECT_TRUE(publishResult); @@ -2364,9 +2364,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0100, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2374,10 +2374,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0100, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2385,10 +2385,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0100, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE1); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2428,9 +2428,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0200, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2438,10 +2438,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0200, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2449,10 +2449,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0200, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE2); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2492,10 +2492,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0300, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2503,11 +2503,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0300, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2515,11 +2515,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0300, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE3); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2559,10 +2559,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0400, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2570,11 +2570,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0400, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2582,11 +2582,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0400, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE4); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2626,10 +2626,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0500, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2637,11 +2637,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0500, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2649,11 +2649,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0500, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE5); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2693,9 +2693,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0600, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2703,10 +2703,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0600, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2714,10 +2714,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0600, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE6); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2757,10 +2757,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0700, Function | Medi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2768,11 +2768,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0700, Function | Medi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); - subscriberInfoSecond.SetPriority(MIDPRIORITY); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); + subscribeInfoSecond.SetPriority(MIDPRIORITY); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2780,11 +2780,11 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventData_CodeDataInfo_0700, Function | Medi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE7); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); - subscriberInfoThird.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); + subscribeInfoThird.SetPriority(HIGHPRIORITY); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2913,9 +2913,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0100, Functi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2923,10 +2923,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0100, Functi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2934,10 +2934,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0100, Functi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE8); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -2971,9 +2971,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0200, Functi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -2981,10 +2981,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0200, Functi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -2992,10 +2992,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0200, Functi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE9); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3029,9 +3029,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0300, Functi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3039,10 +3039,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0300, Functi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3050,10 +3050,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0300, Functi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE10); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3087,9 +3087,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0400, Functi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3097,10 +3097,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0400, Functi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3108,10 +3108,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0400, Functi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE11); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3145,9 +3145,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0500, Functi MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3155,10 +3155,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0500, Functi MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3166,10 +3166,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CommonEventInfo_0500, Functi MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE12); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3203,9 +3203,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0100, Func MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3213,10 +3213,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0100, Func MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3224,10 +3224,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0100, Func MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE19); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3261,9 +3261,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0200, Func MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3271,10 +3271,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0200, Func MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3282,10 +3282,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0200, Func MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE20); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3319,9 +3319,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0300, Func MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3329,10 +3329,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0300, Func MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3340,10 +3340,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0300, Func MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE21); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3377,9 +3377,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0400, Func MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3387,10 +3387,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0400, Func MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3398,10 +3398,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0400, Func MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE22); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); @@ -3435,9 +3435,9 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0500, Func MatchingSkills matchingSkills; matchingSkills.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); - std::shared_ptr subscriberFirstTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberFirstTest = std::make_shared(subscribeInfo); bool subscribeFirstResult = CommonEventManager::SubscribeCommonEvent(subscriberFirstTest); EXPECT_TRUE(subscribeFirstResult); @@ -3445,10 +3445,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0500, Func MatchingSkills matchingSkillsSecond; matchingSkillsSecond.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfoSecond(matchingSkillsSecond); + CommonEventSubscribeInfo subscribeInfoSecond(matchingSkillsSecond); std::shared_ptr subscriberSecondTest = - std::make_shared(subscriberInfoSecond); + std::make_shared(subscribeInfoSecond); bool subscribeResultSecond = CommonEventManager::SubscribeCommonEvent(subscriberSecondTest); EXPECT_TRUE(subscribeResultSecond); @@ -3456,10 +3456,10 @@ HWTEST_F(ActsCESDateTest, CES_CommonEventSubscriber_CodeDataAsyncInfo_0500, Func MatchingSkills matchingSkillsThird; matchingSkillsThird.AddEvent(EVENTCASE23); - CommonEventSubscribeInfo subscriberInfoThird(matchingSkillsThird); + CommonEventSubscribeInfo subscribeInfoThird(matchingSkillsThird); std::shared_ptr subscriberThirdTest = - std::make_shared(subscriberInfoThird); + std::make_shared(subscribeInfoThird); bool subscribeResultThird = CommonEventManager::SubscribeCommonEvent(subscriberThirdTest); EXPECT_TRUE(subscribeResultThird); diff --git a/test/systemtest/common/acts/actsCESManagertest/actsCESManagertest.cpp b/test/systemtest/common/acts/actsCESManagertest/actsCESManagertest.cpp index 29c15cb1..be5a7076 100755 --- a/test/systemtest/common/acts/actsCESManagertest/actsCESManagertest.cpp +++ b/test/systemtest/common/acts/actsCESManagertest/actsCESManagertest.cpp @@ -53,13 +53,13 @@ int SIGNUMTHIRD = 0; class CommonEventServicesSystemTest : public CommonEventSubscriber { public: - explicit CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo); + explicit CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) @@ -75,14 +75,14 @@ void CommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) class CommonEventServicesSystemTestSubscriber : public CommonEventSubscriber { public: - explicit CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscriberInfo); + explicit CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTestSubscriber(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; CommonEventServicesSystemTestSubscriber::CommonEventServicesSystemTestSubscriber( - const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) + const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTestSubscriber::OnReceiveEvent(const CommonEventData &data) diff --git a/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp b/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp index a4a9188d..8bb6a30c 100755 --- a/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp +++ b/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp @@ -85,7 +85,7 @@ public: class Subscriber : public CommonEventSubscriber { public: - explicit Subscriber(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo){}; + explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; ~Subscriber() {} @@ -110,7 +110,7 @@ public: class SubscriberTest : public CommonEventSubscriber { public: - explicit SubscriberTest(const CommonEventSubscribeInfo &subscriberInfo) : CommonEventSubscriber(subscriberInfo){}; + explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; ~SubscriberTest() {} @@ -245,8 +245,8 @@ private: class SubscriberAnotherTest : public CommonEventSubscriber { public: - explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo){}; + explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo){}; ~SubscriberAnotherTest() {} @@ -414,10 +414,10 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_010 matchingSkills.AddEvent(EVENTCASE1); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -428,11 +428,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_010 matchingSkillsAnother.AddEvent(EVENTCASE1); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -458,7 +458,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_010 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -531,11 +531,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_020 matchingSkills.AddEvent(EVENTCASE2); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); - subscriberInfo.SetPriority(LOWPRIORITY); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); + subscribeInfo.SetPriority(LOWPRIORITY); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -546,12 +546,12 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_020 matchingSkillsAnother.AddEvent(EVENTCASE2); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); - subscriberInfoAnother.SetPriority(HIGHPRIORITY); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); + subscribeInfoAnother.SetPriority(HIGHPRIORITY); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -577,7 +577,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_020 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -651,10 +651,10 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_030 matchingSkills.AddEvent(EVENTCASE3); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -665,11 +665,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_030 matchingSkillsAnother.AddEvent(EVENTCASE3); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -696,7 +696,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_030 g_mtxAnother.lock(); // publish ordered event - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); EXPECT_EQ(true, publishResult); @@ -763,10 +763,10 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_040 matchingSkills.AddEvent(EVENTCASE4); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -777,11 +777,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_040 matchingSkillsAnother.AddEvent(EVENTCASE4); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -807,7 +807,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_040 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); @@ -877,10 +877,10 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_050 matchingSkills.AddEvent(EVENTCASE5); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -891,11 +891,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_050 matchingSkillsAnother.AddEvent(EVENTCASE5); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -922,7 +922,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_050 g_mtxAnother.lock(); // publish ordered event - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); EXPECT_EQ(true, publishResult); @@ -992,10 +992,10 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_060 matchingSkills.AddEvent(EVENTCASE6); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - std::shared_ptr subscriberTest = std::make_shared(subscriberInfo); + std::shared_ptr subscriberTest = std::make_shared(subscribeInfo); // subscribe a common event bool subscribeResult = SubscribeCommonEventTest(subscriberTest); @@ -1006,11 +1006,11 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_060 matchingSkillsAnother.AddEvent(EVENTCASE6); // make another subcriber info - CommonEventSubscribeInfo subscriberInfoAnother(matchingSkillsAnother); + CommonEventSubscribeInfo subscribeInfoAnother(matchingSkillsAnother); // make another subcriber object std::shared_ptr subscriberTestAnother = - std::make_shared(subscriberInfoAnother); + std::make_shared(subscribeInfoAnother); // subscribe another event bool subscribeResultAnother = SubscribeCommonEventTest(subscriberTestAnother); @@ -1036,7 +1036,7 @@ HWTEST_F(CESPublishOrderedEventSystmTest, CommonEventPublishOrderedEventTest_060 g_mtx.lock(); g_mtxAnother.lock(); - std::shared_ptr subscriber = std::make_shared(subscriberInfo); + std::shared_ptr subscriber = std::make_shared(subscribeInfo); // publish ordered event bool publishResult = PublishOrderedCommonEventTest(data, publishInfo, subscriber); diff --git a/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp b/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp index 214943be..1b860b6d 100755 --- a/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp +++ b/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp @@ -57,13 +57,13 @@ const int32_t PRIORITY_LOW = 20; class CommonEventServicesSystemTest : public CommonEventSubscriber { public: - CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) @@ -77,14 +77,14 @@ void CommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) class CommonEventServicesSystemTestSubscriber : public CommonEventSubscriber { public: - CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTestSubscriber(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; CommonEventServicesSystemTestSubscriber::CommonEventServicesSystemTestSubscriber( - const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) + const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTestSubscriber::OnReceiveEvent(const CommonEventData &data) @@ -100,13 +100,13 @@ void CommonEventServicesSystemTestSubscriber::OnReceiveEvent(const CommonEventDa class CESPublishOrderTimeOutOne : public CommonEventSubscriber { public: - CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscriberInfo); + CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CESPublishOrderTimeOutOne(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; -CESPublishOrderTimeOutOne::CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +CESPublishOrderTimeOutOne::CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CESPublishOrderTimeOutOne::OnReceiveEvent(const CommonEventData &data) @@ -116,13 +116,13 @@ void CESPublishOrderTimeOutOne::OnReceiveEvent(const CommonEventData &data) class CESPublishOrderTimeOutTwo : public CommonEventSubscriber { public: - CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscriberInfo); + CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscribeInfo); virtual ~CESPublishOrderTimeOutTwo(){}; virtual void OnReceiveEvent(const CommonEventData &data); }; -CESPublishOrderTimeOutTwo::CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscriberInfo) - : CommonEventSubscriber(subscriberInfo) +CESPublishOrderTimeOutTwo::CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscribeInfo) + : CommonEventSubscriber(subscribeInfo) {} void CESPublishOrderTimeOutTwo::OnReceiveEvent(const CommonEventData &data) diff --git a/test/systemtest/common/resource/cesSTPermissionAndAB/include/ces_st_permission_and_AB.h b/test/systemtest/common/resource/cesSTPermissionAndAB/include/ces_st_permission_and_AB.h index 4ab4ca94..ae813859 100644 --- a/test/systemtest/common/resource/cesSTPermissionAndAB/include/ces_st_permission_and_AB.h +++ b/test/systemtest/common/resource/cesSTPermissionAndAB/include/ces_st_permission_and_AB.h @@ -28,13 +28,13 @@ namespace OHOS { namespace AppExecFwk { class CommonEventServicesSystemTest : public EventFwk::CommonEventSubscriber { public: - CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const EventFwk::CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo) - : EventFwk::CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) + : EventFwk::CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const EventFwk::CommonEventData &data) diff --git a/test/systemtest/common/resource/cesSTPermissionDefaultA/include/ces_st_permission_default_A.h b/test/systemtest/common/resource/cesSTPermissionDefaultA/include/ces_st_permission_default_A.h index 00b5dd9b..1d2a5ccf 100644 --- a/test/systemtest/common/resource/cesSTPermissionDefaultA/include/ces_st_permission_default_A.h +++ b/test/systemtest/common/resource/cesSTPermissionDefaultA/include/ces_st_permission_default_A.h @@ -26,13 +26,13 @@ namespace OHOS { namespace AppExecFwk { class CommonEventServicesSystemTest : public EventFwk::CommonEventSubscriber { public: - CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const EventFwk::CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo) - : EventFwk::CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) + : EventFwk::CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const EventFwk::CommonEventData &data) diff --git a/test/systemtest/common/resource/cesSTPermissionOrAB/include/ces_st_permission_or_AB.h b/test/systemtest/common/resource/cesSTPermissionOrAB/include/ces_st_permission_or_AB.h index bf00f4df..b792eb72 100644 --- a/test/systemtest/common/resource/cesSTPermissionOrAB/include/ces_st_permission_or_AB.h +++ b/test/systemtest/common/resource/cesSTPermissionOrAB/include/ces_st_permission_or_AB.h @@ -26,13 +26,13 @@ namespace OHOS { namespace AppExecFwk { class CommonEventServicesSystemTest : public EventFwk::CommonEventSubscriber { public: - CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const EventFwk::CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo) - : EventFwk::CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) + : EventFwk::CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const EventFwk::CommonEventData &data) diff --git a/test/systemtest/common/resource/cesSTPermissionOrAX/include/ces_st_permission_or_AX.h b/test/systemtest/common/resource/cesSTPermissionOrAX/include/ces_st_permission_or_AX.h index 9a36d486..e728ad83 100644 --- a/test/systemtest/common/resource/cesSTPermissionOrAX/include/ces_st_permission_or_AX.h +++ b/test/systemtest/common/resource/cesSTPermissionOrAX/include/ces_st_permission_or_AX.h @@ -26,13 +26,13 @@ namespace OHOS { namespace AppExecFwk { class CommonEventServicesSystemTest : public EventFwk::CommonEventSubscriber { public: - CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo); + CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo); virtual ~CommonEventServicesSystemTest(){}; virtual void OnReceiveEvent(const EventFwk::CommonEventData &data); }; -CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscriberInfo) - : EventFwk::CommonEventSubscriber(subscriberInfo) +CommonEventServicesSystemTest::CommonEventServicesSystemTest(const EventFwk::CommonEventSubscribeInfo &subscribeInfo) + : EventFwk::CommonEventSubscriber(subscribeInfo) {} void CommonEventServicesSystemTest::OnReceiveEvent(const EventFwk::CommonEventData &data) diff --git a/tools/test/mock/mock_common_event_stub.cpp b/tools/test/mock/mock_common_event_stub.cpp index 0c5d07d0..6edadc69 100644 --- a/tools/test/mock/mock_common_event_stub.cpp +++ b/tools/test/mock/mock_common_event_stub.cpp @@ -26,11 +26,11 @@ bool MockCommonEventStub::PublishCommonEvent(const CommonEventData &event, const } bool MockCommonEventStub::SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) { EVENT_LOGI("enter"); - subscribeInfoPtr = std::make_shared(subscriberInfo); + subscribeInfoPtr = std::make_shared(subscribeInfo); return true; } diff --git a/tools/test/mock/mock_common_event_stub.h b/tools/test/mock/mock_common_event_stub.h index 85dec6e4..aa5de153 100755 --- a/tools/test/mock/mock_common_event_stub.h +++ b/tools/test/mock/mock_common_event_stub.h @@ -32,7 +32,7 @@ public: const sptr &commonEventListener) override; bool SubscribeCommonEvent( - const CommonEventSubscribeInfo &subscriberInfo, const sptr &commonEventListener) override; + const CommonEventSubscribeInfo &subscribeInfo, const sptr &commonEventListener) override; bool DumpState(const std::string &event, std::vector &state) override; diff --git a/tools/test/moduletest/cem/common_event_command_dump_module_test.cpp b/tools/test/moduletest/cem/common_event_command_dump_module_test.cpp index e11de043..c3000a44 100644 --- a/tools/test/moduletest/cem/common_event_command_dump_module_test.cpp +++ b/tools/test/moduletest/cem/common_event_command_dump_module_test.cpp @@ -131,10 +131,10 @@ HWTEST_F(CemCommandDumpModuleTest, Cem_Command_Dump_ModuleTest_0200, Function | matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); diff --git a/tools/test/systemtest/cem/common_event_command_dump_system_test.cpp b/tools/test/systemtest/cem/common_event_command_dump_system_test.cpp index c80ed9b8..8e30b50a 100644 --- a/tools/test/systemtest/cem/common_event_command_dump_system_test.cpp +++ b/tools/test/systemtest/cem/common_event_command_dump_system_test.cpp @@ -80,10 +80,10 @@ HWTEST_F(CemCommandDumpSystemTest, Cem_Command_Dump_SystemTest_0100, Function | matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); @@ -125,10 +125,10 @@ HWTEST_F(CemCommandDumpSystemTest, Cem_Command_Dump_SystemTest_0300, Function | matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); diff --git a/tools/test/systemtest/cem/common_event_command_publish_system_test.cpp b/tools/test/systemtest/cem/common_event_command_publish_system_test.cpp index 85c55d17..21235098 100644 --- a/tools/test/systemtest/cem/common_event_command_publish_system_test.cpp +++ b/tools/test/systemtest/cem/common_event_command_publish_system_test.cpp @@ -113,10 +113,10 @@ HWTEST_F(CemCommandPublishSystemTest, Cem_Command_Publish_SystemTest_0100, Funct matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); @@ -170,13 +170,13 @@ HWTEST_F(CemCommandPublishSystemTest, Cem_Command_Publish_SystemTest_0200, Funct matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // set device id - subscriberInfo.SetDeviceId(STRING_DEVICE_ID_001); + subscribeInfo.SetDeviceId(STRING_DEVICE_ID_001); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); @@ -230,13 +230,13 @@ HWTEST_F(CemCommandPublishSystemTest, Cem_Command_Publish_SystemTest_0300, Funct matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // set device id - subscriberInfo.SetDeviceId(STRING_DEVICE_ID_002); + subscribeInfo.SetDeviceId(STRING_DEVICE_ID_002); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); diff --git a/tools/test/unittest/cem/common_event_command_dump_test.cpp b/tools/test/unittest/cem/common_event_command_dump_test.cpp index 291b486a..bbc2d0ce 100644 --- a/tools/test/unittest/cem/common_event_command_dump_test.cpp +++ b/tools/test/unittest/cem/common_event_command_dump_test.cpp @@ -335,10 +335,10 @@ HWTEST_F(CemCommandDumpTest, Cem_Command_Dump_1100, Function | MediumTest | Leve matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); @@ -418,10 +418,10 @@ HWTEST_F(CemCommandDumpTest, Cem_Command_Dump_1400, Function | MediumTest | Leve matchingSkills.AddEvent(STRING_EVENT); // make subcriber info - CommonEventSubscribeInfo subscriberInfo(matchingSkills); + CommonEventSubscribeInfo subscribeInfo(matchingSkills); // make a subcriber object - auto subscriberTestPtr = std::make_shared(subscriberInfo); + auto subscriberTestPtr = std::make_shared(subscribeInfo); // subscribe a common event CommonEventManager::SubscribeCommonEvent(subscriberTestPtr); -- Gitee From ed7382400d18e74106b7ed96c37af1746af805df Mon Sep 17 00:00:00 2001 From: zhaoyuan17 Date: Tue, 2 Nov 2021 17:59:53 +0000 Subject: [PATCH 2/2] Modify codex Signed-off-by: zhaoyuan17 --- .../common_event_services_module_test.cpp | 4 ++-- ...vent_services_publish_ordered_module_test.cpp | 9 ++++++--- ...vent_services_publish_ordered_system_test.cpp | 9 ++++++--- .../common_event_services_system_test.cpp | 16 ++++++++-------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp b/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp index 13a27051..d12cc688 100755 --- a/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp +++ b/services/test/moduletest/common_event_services_module_test/common_event_services_module_test.cpp @@ -45,8 +45,8 @@ std::shared_ptr handlerPtr; class CommonEventServicesModuleTest : public CommonEventSubscriber { public: - CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscribeInfo); - virtual ~CommonEventServicesModuleTest(){}; + explicit CommonEventServicesModuleTest(const CommonEventSubscribeInfo &subscribeInfo); + virtual ~CommonEventServicesModuleTest() {}; virtual void OnReceiveEvent(const CommonEventData &data); public: diff --git a/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp b/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp index 29778ae3..d8609cc8 100644 --- a/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp +++ b/services/test/moduletest/common_event_services_publish_ordered_module_test/common_event_services_publish_ordered_module_test.cpp @@ -91,7 +91,8 @@ public: class Subscriber : public CommonEventSubscriber { public: - explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; + explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) + {} ~Subscriber() {} @@ -116,7 +117,8 @@ public: class SubscriberTest : public CommonEventSubscriber { public: - explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; + explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) + {} ~SubscriberTest() {} @@ -258,7 +260,8 @@ private: class SubscriberAnotherTest : public CommonEventSubscriber { public: explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscribeInfo) - : CommonEventSubscriber(subscribeInfo){}; + : CommonEventSubscriber(subscribeInfo) + {} ~SubscriberAnotherTest() {} diff --git a/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp b/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp index 8bb6a30c..65d84b8d 100755 --- a/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp +++ b/test/systemtest/common/ces/common_event_services_publish_ordered_system_test/common_event_services_publish_ordered_system_test.cpp @@ -85,7 +85,8 @@ public: class Subscriber : public CommonEventSubscriber { public: - explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; + explicit Subscriber(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) + {} ~Subscriber() {} @@ -110,7 +111,8 @@ public: class SubscriberTest : public CommonEventSubscriber { public: - explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo){}; + explicit SubscriberTest(const CommonEventSubscribeInfo &subscribeInfo) : CommonEventSubscriber(subscribeInfo) + {} ~SubscriberTest() {} @@ -246,7 +248,8 @@ private: class SubscriberAnotherTest : public CommonEventSubscriber { public: explicit SubscriberAnotherTest(const CommonEventSubscribeInfo &subscribeInfo) - : CommonEventSubscriber(subscribeInfo){}; + : CommonEventSubscriber(subscribeInfo) + {} ~SubscriberAnotherTest() {} diff --git a/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp b/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp index 1b860b6d..e34eccbf 100755 --- a/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp +++ b/test/systemtest/common/ces/common_event_services_system_test/common_event_services_system_test.cpp @@ -57,8 +57,8 @@ const int32_t PRIORITY_LOW = 20; class CommonEventServicesSystemTest : public CommonEventSubscriber { public: - CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo); - virtual ~CommonEventServicesSystemTest(){}; + explicit CommonEventServicesSystemTest(const CommonEventSubscribeInfo &subscribeInfo); + virtual ~CommonEventServicesSystemTest() {}; virtual void OnReceiveEvent(const CommonEventData &data); }; @@ -77,8 +77,8 @@ void CommonEventServicesSystemTest::OnReceiveEvent(const CommonEventData &data) class CommonEventServicesSystemTestSubscriber : public CommonEventSubscriber { public: - CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscribeInfo); - virtual ~CommonEventServicesSystemTestSubscriber(){}; + explicit CommonEventServicesSystemTestSubscriber(const CommonEventSubscribeInfo &subscribeInfo); + virtual ~CommonEventServicesSystemTestSubscriber() {}; virtual void OnReceiveEvent(const CommonEventData &data); }; @@ -100,8 +100,8 @@ void CommonEventServicesSystemTestSubscriber::OnReceiveEvent(const CommonEventDa class CESPublishOrderTimeOutOne : public CommonEventSubscriber { public: - CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscribeInfo); - virtual ~CESPublishOrderTimeOutOne(){}; + explicit CESPublishOrderTimeOutOne(const CommonEventSubscribeInfo &subscribeInfo); + virtual ~CESPublishOrderTimeOutOne() {}; virtual void OnReceiveEvent(const CommonEventData &data); }; @@ -116,8 +116,8 @@ void CESPublishOrderTimeOutOne::OnReceiveEvent(const CommonEventData &data) class CESPublishOrderTimeOutTwo : public CommonEventSubscriber { public: - CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscribeInfo); - virtual ~CESPublishOrderTimeOutTwo(){}; + explicit CESPublishOrderTimeOutTwo(const CommonEventSubscribeInfo &subscribeInfo); + virtual ~CESPublishOrderTimeOutTwo() {}; virtual void OnReceiveEvent(const CommonEventData &data); }; -- Gitee