• 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 <gtest/gtest.h>
17 #include "hisys_event_util.h"
18 #include "print_constant.h"
19 
20 #include "mock_hisys_event_util.h"
21 
22 using namespace testing::ext;
23 
24 namespace OHOS {
25 namespace Print {
26 class HisysEventUtilTest : public testing::Test {
27 public:
28     static void SetUpTestCase(void);
29     static void TearDownTestCase(void);
30     void SetUp();
31     void TearDown();
32 };
33 
SetUpTestCase(void)34 void HisysEventUtilTest::SetUpTestCase(void) {}
35 
TearDownTestCase(void)36 void HisysEventUtilTest::TearDownTestCase(void) {}
37 
SetUp(void)38 void HisysEventUtilTest::SetUp(void) {}
39 
TearDown(void)40 void HisysEventUtilTest::TearDown(void) {}
41 
42 /**
43 * @tc.name: HisysEventUtilTest_0001
44 * @tc.desc: reportPrintSuccess
45 * @tc.type: FUNC
46 * @tc.require:
47 */
48 HWTEST_F(HisysEventUtilTest, HisysEventUtilTest_0001_NeedRename, TestSize.Level1)
49 {
50     OHOS::Print::HisysEventUtil util;
51     std::string param = "";
52     util->reportBehaviorEvent("test", HisysEventUtil::SEND_TASK, param);
53     EXPECT_CALL(util, reportBehaviorEvent(_, _, _)).Times(1);
54 }
55 } // namespace Print
56 } // namespace OHOS