1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef OHOS_UTTEST_DM_DISTRIBUTED_HARDWARE_LOAD_H 16 #define OHOS_UTTEST_DM_DISTRIBUTED_HARDWARE_LOAD_H 17 18 #include <gtest/gtest.h> 19 #include <refbase.h> 20 21 #include "dm_adapter_manager.h" 22 #include "dm_constants.h" 23 #include "dm_crypto.h" 24 #include "dm_distributed_hardware_load.h" 25 26 namespace OHOS { 27 namespace DistributedHardware { 28 class DmDistributedHardwareLoadTest : public testing::Test { 29 public: 30 static void SetUpTestCase(); 31 static void TearDownTestCase(); 32 void SetUp(); 33 void TearDown(); 34 }; 35 36 class IRemoteObjectTest : public IRemoteObject { 37 public: GetObjectRefCount()38 int32_t GetObjectRefCount() override 39 { 40 return DM_OK; 41 } SendRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)42 int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override 43 { 44 (void)code; 45 (void)data; 46 (void)reply; 47 (void)option; 48 return DM_OK; 49 } AddDeathRecipient(const sptr<DeathRecipient> & recipient)50 bool AddDeathRecipient(const sptr<DeathRecipient> &recipient) override 51 { 52 (void)recipient; 53 return true; 54 } RemoveDeathRecipient(const sptr<DeathRecipient> & recipient)55 bool RemoveDeathRecipient(const sptr<DeathRecipient> &recipient) override 56 { 57 (void)recipient; 58 return true; 59 } Dump(int fd,const std::vector<std::u16string> & args)60 int Dump(int fd, const std::vector<std::u16string> &args) override 61 { 62 (void)fd; 63 (void)args; 64 return DM_OK; 65 } 66 }; 67 } // namespace DistributedHardware 68 } // namespace OHOS 69 #endif 70