1 /* 2 * Copyright (c) 2022-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 EDM_UNIT_TEST_ENTERPRISE_DEVICE_MGR_ABILITY_TEST_H 17 #define EDM_UNIT_TEST_ENTERPRISE_DEVICE_MGR_ABILITY_TEST_H 18 19 #include <gtest/gtest.h> 20 #include <memory> 21 22 #define private public 23 #include "permission_checker.h" 24 #undef private 25 26 #include "edm_access_token_manager_impl_mock.h" 27 #include "edm_app_manager_impl_mock.h" 28 #include "edm_bundle_manager_impl_mock.h" 29 #include "edm_os_account_manager_impl_mock.h" 30 #include "enterprise_device_mgr_ability_mock.h" 31 #include "external_manager_factory_mock.h" 32 #include "permission_checker_mock.h" 33 34 namespace OHOS { 35 namespace EDM { 36 namespace TEST { 37 class PermissionCheckerTest : public testing::Test { 38 public: 39 void SetUp() override; 40 void TearDown() override; 41 42 protected: 43 std::shared_ptr<EdmAppManagerImplMock> appMgrMock_ = nullptr; 44 std::shared_ptr<EdmBundleManagerImplMock> bundleMgrMock_ = nullptr; 45 std::shared_ptr<EdmOsAccountManagerImplMock> osAccountMgrMock_ = nullptr; 46 std::shared_ptr<EdmAccessTokenManagerImplMock> accessTokenMgrMock_ = nullptr; 47 std::shared_ptr<ExternalManagerFactoryMock> factoryMock_ = nullptr; 48 std::shared_ptr<PermissionCheckerMock> permissionChecker_ = nullptr; 49 }; 50 } // namespace TEST 51 } // namespace EDM 52 } // namespace OHOS 53 #endif // EDM_UNIT_TEST_ENTERPRISE_DEVICE_MGR_ABILITY_TEST_H