• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 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 "template_cache_manager_test.h"
17 
18 #include "iam_common_defines.h"
19 #include "template_cache_manager.h"
20 #include "os_account_manager.h"
21 #include "system_ability_definition.h"
22 #include "system_ability_status_change_stub.h"
23 
24 namespace OHOS {
25 namespace UserIam {
26 namespace UserAuth {
27 using namespace testing;
28 using namespace testing::ext;
29 
SetUpTestCase()30 void TemplateCacheManagerTest::SetUpTestCase()
31 {
32 }
33 
TearDownTestCase()34 void TemplateCacheManagerTest::TearDownTestCase()
35 {
36 }
37 
SetUp()38 void TemplateCacheManagerTest::SetUp()
39 {
40 }
41 
TearDown()42 void TemplateCacheManagerTest::TearDown()
43 {
44 }
45 
46 HWTEST_F(TemplateCacheManagerTest, TemplateCacheManagerTest_001, TestSize.Level1)
47 {
48     EXPECT_NO_THROW({
49         TemplateCacheManager::GetInstance().UpdateTemplateCache(PIN);
50         TemplateCacheManager::GetInstance().ProcessUserIdChange(1);
51         TemplateCacheManager::GetInstance().ProcessUserIdChange(1);
52         TemplateCacheManager::GetInstance().UpdateTemplateCache(PIN);
53     });
54 }
55 } // namespace UserAuth
56 } // namespace UserIam
57 } // namespace OHOS