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 #include <gtest/gtest.h>
17 
18 #include "external_manager_factory.h"
19 
20 using namespace testing::ext;
21 
22 namespace OHOS {
23 namespace EDM {
24 namespace TEST {
25 class ExternalManagerFactoryTest : public testing::Test {};
26 /**
27  * @tc.name: TestCreateAppManager
28  * @tc.desc: Test CreateAppManager function.
29  * @tc.type: FUNC
30  */
31 HWTEST_F(ExternalManagerFactoryTest, TestCreateAppManager, TestSize.Level1)
32 {
33     ExternalManagerFactory externalManagerFactory;
34     ASSERT_TRUE(externalManagerFactory.CreateAppManager() != nullptr);
35 }
36 
37 /**
38  * @tc.name: TestCreateBundleManager
39  * @tc.desc: Test CreateBundleManager function.
40  * @tc.type: FUNC
41  */
42 HWTEST_F(ExternalManagerFactoryTest, TestCreateBundleManager, TestSize.Level1)
43 {
44     ExternalManagerFactory externalManagerFactory;
45     ASSERT_TRUE(externalManagerFactory.CreateBundleManager() != nullptr);
46 }
47 
48 /**
49  * @tc.name: TestCreateOsAccountManager
50  * @tc.desc: Test CreateOsAccountManager function.
51  * @tc.type: FUNC
52  */
53 HWTEST_F(ExternalManagerFactoryTest, TestCreateOsAccountManager, TestSize.Level1)
54 {
55     ExternalManagerFactory externalManagerFactory;
56     ASSERT_TRUE(externalManagerFactory.CreateOsAccountManager() != nullptr);
57 }
58 
59 /**
60  * @tc.name: TestCreateAccessTokenManager
61  * @tc.desc: Test CreateAccessTokenManager function.
62  * @tc.type: FUNC
63  */
64 HWTEST_F(ExternalManagerFactoryTest, TestCreateAccessTokenManager, TestSize.Level1)
65 {
66     ExternalManagerFactory externalManagerFactory;
67     ASSERT_TRUE(externalManagerFactory.CreateAccessTokenManager() != nullptr);
68 }
69 } // namespace TEST
70 } // namespace EDM
71 } // namespace OHOS