/foundation/ability/ability_runtime/test/unittest/dataobs_mgr_inner_ext_test/ |
H A D | dataobs_mgr_inner_ext_test.cpp | 184 sptr<MockDataAbilityObserverStub> observer2(new (std::nothrow) MockDataAbilityObserverStub()); in HWTEST_F() 188 EXPECT_EQ(dataObsMgrInnerExt->HandleRegisterObserver(uri1, observer2), SUCCESS); in HWTEST_F() 190 EXPECT_EQ(dataObsMgrInnerExt->HandleRegisterObserver(uri2, observer2), SUCCESS); in HWTEST_F() 198 EXPECT_TRUE(UrisEqual(observer2->changeInfo_.uris_, { uri1 })); in HWTEST_F() 202 observer2->ReSet(); in HWTEST_F() 206 EXPECT_TRUE(UrisEqual(observer2->changeInfo_.uris_, { uri2 })); in HWTEST_F() 304 sptr<MockDataAbilityObserverStub> observer2(new (std::nothrow) MockDataAbilityObserverStub()); in HWTEST_F() 305 EXPECT_EQ(dataObsMgrInnerExt->HandleRegisterObserver(uri14, observer2, true), SUCCESS); in HWTEST_F() 309 EXPECT_TRUE(UrisEqual(observer2->changeInfo_.uris_, {})); in HWTEST_F() 312 observer2 in HWTEST_F() 743 sptr<MockDataAbilityObserverStub> observer2 = (new (std::nothrow) MockDataAbilityObserverStub()); HWTEST_F() local 780 sptr<MockDataAbilityObserverStub> observer2 = (new (std::nothrow) MockDataAbilityObserverStub()); HWTEST_F() local [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/moduletest/src/ |
H A D | distributeddb_kv_observer_test.cpp | 203 KvStoreObserverImpl observer1, observer2; in HWTEST_F() local 242 * @tc.steps: step5. register observer2 bases on kv db. in HWTEST_F() 245 status = DistributedTestTools::RegisterObserver(g_observerDelegate, &observer2); in HWTEST_F() 259 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, INSERT_LIST, insertEntries)); in HWTEST_F() 260 observer2.Clear(); in HWTEST_F() 264 statusRelease = DistributedTestTools::UnRegisterObserver(g_observerDelegate, &observer2); in HWTEST_F() 853 KvStoreObserverImpl &observer1, KvStoreObserverImpl &observer2) in KvObserverVerifyInsert() 865 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, INSERT_LIST, insertEntries2)); in KvObserverVerifyInsert() 866 observer2.Clear(); in KvObserverVerifyInsert() 876 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIM in KvObserverVerifyInsert() 852 KvObserverVerifyInsert(KvStoreDelegate *&delegate1, KvStoreDelegate *&delegate2, KvStoreObserverImpl &observer1, KvStoreObserverImpl &observer2) KvObserverVerifyInsert() argument 894 KvObserverVerifyUpdateAndDelete(KvStoreDelegate *&delegate1, KvStoreDelegate *&delegate2, KvStoreObserverImpl &observer1, KvStoreObserverImpl &observer2, vector<Entry> &entriesBatch) KvObserverVerifyUpdateAndDelete() argument 960 KvStoreObserverImpl observer1, observer2; HWTEST_F() local 1064 KvObserverVerifyTransactionRollback(KvStoreObserverImpl &observer2, KvStoreDelegate *&delegate2) KvObserverVerifyTransactionRollback() argument 1116 KvStoreObserverImpl observer2; HWTEST_F() local [all...] |
H A D | distributeddb_nb_local_batch_crud_test.cpp | 650 KvStoreObserverImpl observer1, observer2, observer3; in HWTEST_F() local 656 EXPECT_EQ(g_nbLocalBatchDelegate->RegisterObserver(KEY_2, OBSERVER_CHANGES_LOCAL_ONLY, &observer2), OK); in HWTEST_F() 661 * @tc.expected: step2. PutLocalBatch and observer1, and observer2 was triggered but observer3 was not triggered. in HWTEST_F() 672 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, INSERT_LIST, changeList)); in HWTEST_F() 677 * @tc.expected: step3. PutLocalBatch success and observer1 was not triggered, observer2 was triggered update mode, in HWTEST_F() 681 observer2.Clear(); in HWTEST_F() 689 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, UPDATE_LIST, changeList)); in HWTEST_F() 704 KvStoreObserverImpl observer1, observer2, observer3; in HWTEST_F() local 715 EXPECT_EQ(g_nbLocalBatchDelegate->RegisterObserver(KEY_2, OBSERVER_CHANGES_LOCAL_ONLY, &observer2), OK); in HWTEST_F() 720 * @tc.expected: step2. DeleteLocalBatch success and observer1, and observer2 wa in HWTEST_F() 755 KvStoreObserverImpl observer1, observer2, observer3; HWTEST_F() local 816 KvStoreObserverImpl observer1, observer2, observer3; HWTEST_F() local [all...] |
H A D | distributeddb_nb_batch_crud_test.cpp | 742 KvStoreObserverImpl observer1, observer2, observer3; in HWTEST_F() local 751 * @tc.steps: step1. register observer1,observer2,observer3 for k1,k2,k3 with in HWTEST_F() 756 EXPECT_EQ(g_nbBatchCrudDelegate->RegisterObserver(KEY_2, OBSERVER_CHANGES_NATIVE, &observer2), OK); in HWTEST_F() 761 * @tc.expected: step2. putbatch successfully and the callback of observer1 and observer2 in HWTEST_F() 769 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, ListType::INSERT_LIST, observerCallbackEntries)); in HWTEST_F() 771 observer2.Clear(); in HWTEST_F() 776 * @tc.expected: step3. putbatch successfully and the callback of observer2 is once UPDATE_LIST, in HWTEST_F() 783 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, ListType::UPDATE_LIST, observerCallbackEntries)); in HWTEST_F() 798 KvStoreObserverImpl observer1, observer2, observer3; in HWTEST_F() local 817 * @tc.steps: step2. register observer1,observer2,observer in HWTEST_F() 852 KvStoreObserverImpl observer1, observer2, observer3; HWTEST_F() local 913 KvStoreObserverImpl observer1, observer2; HWTEST_F() local 2242 KvStoreObserverImpl observer1, observer2; HWTEST_F() local 2321 KvStoreObserverImpl observer1, observer2; HWTEST_F() local 2374 KvStoreObserverImpl observer1, observer2, observer3, observer4; HWTEST_F() local [all...] |
H A D | distributeddb_kv_observer_snap_test.cpp | 204 KvStoreObserverImpl observer1, observer2; in HWTEST_F() local 243 * @tc.steps: step5. register observer2 bases on kv db snap. in HWTEST_F() 246 KvStoreSnapshotDelegate *snapShot2 = DistributedTestTools::RegisterSnapObserver(g_observerSnapDelegate, &observer2); in HWTEST_F() 259 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ONE_TIME, INSERT_LIST, insertEntries1)); in HWTEST_F() 260 observer2.Clear(); in HWTEST_F() 994 KvStoreObserverImpl observer1, observer2; in HWTEST_F() local 997 observers.push_back(observer2); in HWTEST_F() 1007 * @tc.steps: step2. register observer2 bases on kv db snap2. in HWTEST_F() 1108 void ObserverSnapVerifyTransactionRollback(KvStoreDelegate *&delegate2, KvStoreObserverImpl &observer2) in ObserverSnapVerifyTransactionRollback() argument 1131 EXPECT_TRUE(VerifyObserverResult(observer2, CHANGED_ZERO_TIM in ObserverSnapVerifyTransactionRollback() 1161 KvStoreObserverImpl observer2; HWTEST_F() local [all...] |
H A D | distributeddb_kv_batch_crud_test.cpp | 680 KvStoreObserverSnapImpl observer2; in MultiSnapCheck1() local 684 KvStoreSnapshotDelegate *snap2 = DistributedTestTools::RegisterSnapObserver(g_kvStoreBatchDelegate, &observer2); in MultiSnapCheck1() 864 vector<Key> RegisterSnapAgainAndCheck2(KvStoreObserverSnapImpl &observer2, KvStoreSnapshotDelegate *&snap2, in RegisterSnapAgainAndCheck2() argument 879 snap2 = DistributedTestTools::RegisterSnapObserver(g_kvStoreBatchDelegate, &observer2); in RegisterSnapAgainAndCheck2() 1054 KvStoreObserverSnapImpl observer1, observer2, observer3, observer4, observer5, observer6, observer7, observer8; in HWTEST_F() local 1057 KvStoreSnapshotDelegate *snap2 = DistributedTestTools::RegisterSnapObserver(g_kvStoreBatchDelegate, &observer2); in HWTEST_F() 1077 vector<Key> keys1 = RegisterSnapAgainAndCheck2(observer2, snap2, entries1, keyPrefix); in HWTEST_F()
|
H A D | distributeddb_nb_autolaunch_test.cpp | 539 * @tc.steps: step7. call EnableKvStoreAutoLaunch use the option with which observer = observer2. in HWTEST_F() 542 KvStoreObserverImpl observer2; in HWTEST_F() local 543 option = {true, false, CipherType::DEFAULT, NULL_PASSWD, "", false, DistributedDBConstant::NB_DIRECTOR, &observer2}; in HWTEST_F() 564 option = {true, true, CipherType::DEFAULT, passwd1, schema, true, DIRECTOR, &observer2}; in HWTEST_F()
|
H A D | distributeddb_nb_enable_sync_by_closed_db_test.cpp | 528 * @tc.steps: step7. call EnableKvStoreAutoLaunch use the option with which observer = observer2. in HWTEST_F() 531 KvStoreObserverImpl observer2; in HWTEST_F() local 532 option = {true, false, CipherType::DEFAULT, NULL_PASSWD, "", false, NB_DIRECTOR, &observer2}; in HWTEST_F() 553 option = {true, true, CipherType::DEFAULT, passwd1, schema, true, DIRECTOR, &observer2}; in HWTEST_F()
|
H A D | distributeddb_nb_observer_test.cpp | 178 * @tc.steps: step2. register sync observer2 use OBSERVER_CHANGES_NATIVE. in HWTEST_F() 185 * @tc.expected: step3. observer1 will be response but observer2 won't. in HWTEST_F() 196 * @tc.expected: step4. observer1 will be response but observer2 won't. in HWTEST_F() 206 * @tc.steps: step5. verify that if observer2 will be triggered when put (KEY_1, VALUE_1) to sync db. in HWTEST_F() 207 * @tc.expected: step5. observer2 will be response but observer1 won't. in HWTEST_F() 217 * @tc.steps: step6. verify that if observer2 will be triggered when delete (KEY_1, VALUE_1) from sync db. in HWTEST_F() 218 * @tc.expected: step6. observer1 will be response but observer2 won't. in HWTEST_F() 697 KvStoreObserverImpl observer1, observer2, observer3, observer4, observer; in HWTEST_F() local 702 status = g_nbObserverDelegate->RegisterObserver(KEY_1, OBSERVER_CHANGES_NATIVE, &observer2); in HWTEST_F() 726 g_nbObserverDelegate->UnRegisterObserver(&observer2); in HWTEST_F() 744 KvStoreObserverImpl observer1, observer2, observer3, observer4, observer5, observer6; HWTEST_F() local [all...] |
/foundation/distributeddatamgr/relational_store/test/native/rdb/unittest/ |
H A D | rdb_store_subscribe_test.cpp | 282 store->Subscribe({ SubscribeMode::LOCAL, "observer2" }, observer_.get()); in HWTEST_F() 287 status = store->Notify("observer2"); in HWTEST_F() 301 status = store->UnSubscribe({ SubscribeMode::LOCAL, "observer2" }, nullptr); in HWTEST_F() 321 store->Subscribe({ SubscribeMode::LOCAL_SHARED, "observer2" }, observer_.get()); in HWTEST_F() 330 status = store->UnSubscribe({ SubscribeMode::LOCAL_SHARED, "observer2" }, nullptr); in HWTEST_F() 352 auto observer2 = std::make_shared<SubObserver>(); in HWTEST_F() local 353 status = store->SubscribeObserver({ SubscribeMode::LOCAL_DETAIL, "dataChange" }, observer2); in HWTEST_F() 355 RegisterCheckInsertCallback({ observer_, observer2 }); in HWTEST_F() 367 observer2->RegisterCallback([](RdbStoreObserver::ChangeInfo &) { ASSERT_TRUE(false); }); in HWTEST_F() 370 status = store->UnsubscribeObserver({ SubscribeMode::LOCAL_DETAIL, "dataChange" }, observer2); in HWTEST_F() 400 auto observer2 = std::make_shared<SubObserver>(); HWTEST_F() local 604 auto observer2 = std::make_shared<StatisticsObserver>(); HWTEST_F() local [all...] |
/foundation/distributeddatamgr/relational_store/test/ndk/unittest/ |
H A D | rdb_store_test.cpp | 1227 Rdb_DataObserver observer2 = { nullptr, { callback2 } }; in HWTEST_F() local 1230 EXPECT_EQ(OH_Rdb_Subscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2), RDB_OK); in HWTEST_F() 1241 EXPECT_EQ(OH_Rdb_Unsubscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2), RDB_OK); in HWTEST_F() 1265 Rdb_DataObserver observer2 = { nullptr, { callback2 } }; in HWTEST_F() local 1268 EXPECT_EQ(OH_Rdb_Subscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2), RDB_OK); in HWTEST_F() 1279 EXPECT_EQ(OH_Rdb_Unsubscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2), RDB_OK); in HWTEST_F() 1429 Rdb_DataObserver observer2 = { nullptr, { callback2 } }; in HWTEST_F() local 1433 EXPECT_EQ(OH_Rdb_Subscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2), RDB_OK); in HWTEST_F() 1482 Rdb_DataObserver observer2 = { nullptr, { nullptr } }; in HWTEST_F() local 1483 errCode = OH_Rdb_Subscribe(storeTestRdbStore_, RDB_SUBSCRIBE_TYPE_LOCAL_DETAILS, &observer2); in HWTEST_F() [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/distributeddatafwk/test/unittest/ |
H A D | local_subscribe_store_test.cpp | 266 auto observer2 = std::make_shared<KvStoreObserverUnitTest>(); in HWTEST_F() local 271 status = kvStore->SubscribeKvStore(subscribeType, observer2); in HWTEST_F() 281 EXPECT_EQ(static_cast<int>(observer2->GetCallCount()), 1); in HWTEST_F() 286 status = kvStore->UnSubscribeKvStore(subscribeType, observer2); in HWTEST_F() 805 auto observer2 = std::make_shared<KvStoreObserverUnitTest>(); in HWTEST_F() local 810 status = kvStore->SubscribeKvStore(subscribeType, observer2); in HWTEST_F() 824 EXPECT_EQ(static_cast<int>(observer2->GetCallCount()), 1); in HWTEST_F() 825 EXPECT_EQ(static_cast<int>(observer2->insertEntries_.size()), 1); in HWTEST_F() 826 EXPECT_EQ("Id1", observer2->insertEntries_[0].key.ToString()); in HWTEST_F() 827 EXPECT_EQ("subscribe", observer2 in HWTEST_F() [all...] |
H A D | local_subscribe_device_store_test.cpp | 253 auto observer2 = std::make_shared<DeviceObserverTest>(); in HWTEST_F() local 258 status = kvStore_->SubscribeKvStore(subscribeType, observer2); in HWTEST_F() 268 EXPECT_EQ(static_cast<int>(observer2->GetCallCount()), 1); in HWTEST_F() 273 status = kvStore_->UnSubscribeKvStore(subscribeType, observer2); in HWTEST_F() 793 auto observer2 = std::make_shared<DeviceObserverTest>(); in HWTEST_F() local 798 status = kvStore_->SubscribeKvStore(subscribeType, observer2); in HWTEST_F() 812 EXPECT_EQ(static_cast<int>(observer2->GetCallCount()), 1); in HWTEST_F() 813 EXPECT_EQ(static_cast<int>(observer2->insertEntries_.size()), 1); in HWTEST_F() 814 EXPECT_EQ("Id1", observer2->insertEntries_[0].key.ToString()); in HWTEST_F() 815 EXPECT_EQ("subscribe", observer2 in HWTEST_F() [all...] |
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage/cloud/ |
H A D | distributeddb_cloud_check_sync_test.cpp | 990 auto observer2 = new (std::nothrow) RelationalStoreObserverUnitTest(); in HWTEST_F() local 991 ASSERT_NE(observer2, nullptr); in HWTEST_F() 992 option.observer = observer2; in HWTEST_F() 1010 EXPECT_EQ(observer2->GetCloudCallCount(), 1u); in HWTEST_F() 1017 observer2->ResetCloudSyncToZero(); in HWTEST_F() 1027 EXPECT_EQ(observer2->GetCloudCallCount(), 0u); in HWTEST_F() 1033 delete observer2; in HWTEST_F() 1034 observer2 = nullptr; in HWTEST_F()
|
/foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer/ |
H A D | distributeddb_relational_ver_p2p_sync_test.cpp | 1931 auto observer2 = new (std::nothrow) RelationalStoreObserverUnitTest(); in RegisterNewObserver() local 1932 ASSERT_NE(observer2, nullptr); in RegisterNewObserver() 1933 EXPECT_EQ(rdb1->RegisterObserver(observer2), OK); in RegisterNewObserver() 1941 EXPECT_EQ(observer2->GetCallCount(), 1u); in RegisterNewObserver() 1944 observer2->ResetToZero(); in RegisterNewObserver() 1950 EXPECT_EQ(observer2->GetCallCount(), 0u); in RegisterNewObserver() 1955 delete observer2; in RegisterNewObserver()
|