1 /*
2 * Copyright (c) 2021-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 #include "test_log.h"
18
19 #include "local_ability_manager_dumper.h"
20
21 using namespace std;
22 using namespace testing;
23 using namespace testing::ext;
24
25 namespace OHOS {
26 class LocalAbilityManagerDumperTest : public testing::Test {
27 public:
28 static void SetUpTestCase();
29 static void TearDownTestCase();
30 void SetUp();
31 void TearDown();
32 };
33
SetUpTestCase()34 void LocalAbilityManagerDumperTest::SetUpTestCase()
35 {
36 DTEST_LOG << "SetUpTestCase" << std::endl;
37 }
38
TearDownTestCase()39 void LocalAbilityManagerDumperTest::TearDownTestCase()
40 {
41 DTEST_LOG << "TearDownTestCase" << std::endl;
42 }
43
SetUp()44 void LocalAbilityManagerDumperTest::SetUp()
45 {
46 DTEST_LOG << "SetUp" << std::endl;
47 }
48
TearDown()49 void LocalAbilityManagerDumperTest::TearDown()
50 {
51 DTEST_LOG << "TearDown" << std::endl;
52 }
53
54 /**
55 * @tc.name: StartIpcStatistics001
56 * @tc.desc: test StartIpcStatistics
57 * @tc.type: FUNC
58 * @tc.require: I9DR69
59 */
60 HWTEST_F(LocalAbilityManagerDumperTest, StartIpcStatistics001, TestSize.Level2)
61 {
62 std::string result;
63 bool ret = LocalAbilityManagerDumper::StartIpcStatistics(result);
64 EXPECT_EQ(ret, true);
65 }
66
67 /**
68 * @tc.name: StopIpcStatistics001
69 * @tc.desc: test StopIpcStatistics
70 * @tc.type: FUNC
71 * @tc.require: I9DR69
72 */
73 HWTEST_F(LocalAbilityManagerDumperTest, StopIpcStatistics001, TestSize.Level2)
74 {
75 std::string result;
76 bool ret = LocalAbilityManagerDumper::StopIpcStatistics(result);
77 EXPECT_EQ(ret, true);
78 }
79
80 /**
81 * @tc.name: GetIpcStatistics001
82 * @tc.desc: test GetIpcStatistics001
83 * @tc.type: FUNC
84 * @tc.require: I9DR69
85 */
86 HWTEST_F(LocalAbilityManagerDumperTest, GetIpcStatistics001, TestSize.Level2)
87 {
88 std::string result;
89 bool ret = LocalAbilityManagerDumper::GetIpcStatistics(result);
90 EXPECT_EQ(ret, true);
91 }
92 }