1 /* 2 * Copyright (c) 2021 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_PERMISSION_TEST_H 17 #define DISTRIBUTED_SCHED_PERMISSION_TEST_H 18 19 #include "device_manager.h" 20 #include "gtest/gtest.h" 21 #include "mock/bundle_manager_internal_mock.h" 22 #include "mock/dtbschedmgr_device_info_storage_mock.h" 23 #include "mock/distributed_sched_adapter_mock.h" 24 #include "mock/dnetwork_adapter_mock.h" 25 26 27 namespace OHOS { 28 namespace DistributedSchedule { 29 class DistributedSchedPermissionTest : public testing::Test { 30 public: 31 static void SetUpTestCase(); 32 static void TearDownTestCase(); 33 void SetUp(); 34 void TearDown(); 35 36 std::string deviceId_; 37 static inline std::shared_ptr<BundleManagerInternalMock> bundleMgrMock_ = nullptr; 38 static inline std::shared_ptr<DtbschedmgrDeviceInfoStorageMock> storageMock_ = nullptr; 39 static inline std::shared_ptr<DistributedSchedAdapterMock> adapter_ = nullptr; 40 static inline std::shared_ptr<DnetworkAdapterMock> netAdapter_ = nullptr; 41 42 protected: 43 class DeviceInitCallBack : public OHOS::DistributedHardware::DmInitCallback { 44 void OnRemoteDied() override; 45 }; 46 }; 47 } // namespace DistributedSchedule 48 } // namespace OHOS 49 #endif // DISTRIBUTED_SCHED_PERMISSION_TEST_H