• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2025 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 #include "event_server_test.h"
16 
17 #include "event_server.h"
18 #include "file_util.h"
19 
20 using namespace testing::ext;
21 using namespace OHOS::HiviewDFX;
22 
23 namespace {
24 const std::string BBOX_PATH = "/dev/bbox";
25 }
26 
SetUp()27 void EventServerTest::SetUp()
28 {
29     printf("EventServerTest SetUp\n");
30     platform.GetPluginMap();
31 }
32 
TearDown()33 void EventServerTest::TearDown()
34 {
35     printf("EventServerTest TearDown\n");
36 }
37 
38 /**
39  * @tc.name: EventServerTest001
40  * @tc.desc: BBoxDevice test.
41  * @tc.type: FUNC
42  * @tc.require: issueI5NULM
43  */
44 HWTEST_F(EventServerTest, EventServerTest001, TestSize.Level3)
45 {
46     BBoxDevice bbox;
47     ASSERT_TRUE(bbox.GetEvents() > 0);
48     ASSERT_NE(bbox.GetName(), "");
49     int res = bbox.Open();
50     ASSERT_TRUE(res >= 0);
51     res = bbox.Close();
52     ASSERT_TRUE(res >= 0);
53 }
54