1115cd2caSopenharmony_ci/* 2115cd2caSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3115cd2caSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4115cd2caSopenharmony_ci * you may not use this file except in compliance with the License. 5115cd2caSopenharmony_ci * You may obtain a copy of the License at 6115cd2caSopenharmony_ci * 7115cd2caSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8115cd2caSopenharmony_ci * 9115cd2caSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10115cd2caSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11115cd2caSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12115cd2caSopenharmony_ci * See the License for the specific language governing permissions and 13115cd2caSopenharmony_ci * limitations under the License. 14115cd2caSopenharmony_ci */ 15115cd2caSopenharmony_ci 16115cd2caSopenharmony_ci#ifndef MERGECONTACT_TEST_H 17115cd2caSopenharmony_ci#define MERGECONTACT_TEST_H 18115cd2caSopenharmony_ci 19115cd2caSopenharmony_ci#include "base_test.h" 20115cd2caSopenharmony_ci 21115cd2caSopenharmony_cinamespace Contacts { 22115cd2caSopenharmony_cinamespace Test { 23115cd2caSopenharmony_ciclass MergeContactTest : public BaseTest { 24115cd2caSopenharmony_cipublic: 25115cd2caSopenharmony_ci int64_t RawContactInsert(std::string displayName); 26115cd2caSopenharmony_ci int64_t ContactDataInsert( 27115cd2caSopenharmony_ci int64_t rawContactId, std::string contentType, std::string detailInfo, std::string position); 28115cd2caSopenharmony_ci std::shared_ptr<OHOS::DataShare::DataShareResultSet> ContactQuery( 29115cd2caSopenharmony_ci std::vector<std::string> columns, OHOS::DataShare::DataSharePredicates predicates); 30115cd2caSopenharmony_ci void CheckMergeResultId(std::vector<int64_t> ids, bool isMerge); 31115cd2caSopenharmony_ci int GetMergeResultContactId(const std::shared_ptr<OHOS::DataShare::DataShareResultSet> resultSet); 32115cd2caSopenharmony_ci std::vector<int> GetMergeResultRawContactId(const std::shared_ptr<OHOS::DataShare::DataShareResultSet> resultSet); 33115cd2caSopenharmony_ci std::vector<int> GetMergeRawContactId(const std::shared_ptr<OHOS::DataShare::DataShareResultSet> resultSet); 34115cd2caSopenharmony_ci void DeleteRawContact(); 35115cd2caSopenharmony_ci}; 36115cd2caSopenharmony_ci} // namespace Test 37115cd2caSopenharmony_ci} // namespace Contacts 38115cd2caSopenharmony_ci#endif // MERGECONTACT_TEST_H 39