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 16 #ifndef DISTRIBUTED_SCHED_STUB_TEST_H 17 #define DISTRIBUTED_SCHED_STUB_TEST_H 18 19 #include "event_handler.h" 20 #include "iremote_stub.h" 21 #include "gtest/gtest.h" 22 23 #define private public 24 #include "mc_motion_manager.h" 25 #undef private 26 27 namespace OHOS { 28 namespace MechBodyController { 29 class MockIRemoteObject : public IRemoteObject { 30 public: MockIRemoteObject()31 MockIRemoteObject() : IRemoteObject(u"mock_i_remote_object") {} ~MockIRemoteObject()32 ~MockIRemoteObject() {} SendRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)33 int SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override 34 { 35 return 0; 36 } GetObjectRefCount()37 int32_t GetObjectRefCount() override 38 { 39 return 0; 40 } AddDeathRecipient(const sptr<DeathRecipient> & recipient)41 bool AddDeathRecipient(const sptr<DeathRecipient> &recipient) override 42 { 43 return true; 44 } RemoveDeathRecipient(const sptr<DeathRecipient> & recipient)45 bool RemoveDeathRecipient(const sptr<DeathRecipient> &recipient) override 46 { 47 return true; 48 } Dump(int fd,const std::vector<std::u16string> & args)49 int Dump(int fd, const std::vector<std::u16string> &args) override 50 { 51 return 0; 52 } GetObjectDescriptor()53 std::u16string GetObjectDescriptor() const 54 { 55 std::u16string descriptor = std::u16string(); 56 return descriptor; 57 } 58 }; 59 60 class MotionManagerTest : public testing::Test { 61 public: 62 static void SetUpTestCase(); 63 static void TearDownTestCase(); 64 void SetUp(); 65 void TearDown(); 66 }; 67 } // namespace MechBodyController 68 } // namespace OHOS 69 #endif // DISTRIBUTED_SCHED_STUB_TEST_H