• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "dms_reporter.h"
18 
19 using namespace testing;
20 using namespace testing::ext;
21 
22 namespace OHOS {
23 namespace Rosen {
24 class DmsReporterTest : public testing::Test {
25 public:
26     static void SetUpTestCase();
27     static void TearDownTestCase();
28     void SetUp() override;
29     void TearDown() override;
30 };
31 
SetUpTestCase()32 void DmsReporterTest::SetUpTestCase() {}
33 
TearDownTestCase()34 void DmsReporterTest::TearDownTestCase() {}
35 
SetUp()36 void DmsReporterTest::SetUp() {}
37 
TearDown()38 void DmsReporterTest::TearDown() {}
39 
40 namespace {
41 /**
42  * @tc.name: ReportRegisterSessionListener
43  * @tc.desc: ReportRegisterSessionListener test
44  * @tc.type: FUNC
45  */
46 HWTEST_F(DmsReporterTest, ReportRegisterSessionListener, TestSize.Level1)
47 {
48     int res = 0;
49     DmsReporter dmsReporter;
50     dmsReporter.ReportRegisterSessionListener(true, 0);
51     ASSERT_EQ(res, 0);
52 }
53 
54 /**
55  * @tc.name: ReportQuerySessionInfo
56  * @tc.desc: ReportQuerySessionInfo test
57  * @tc.type: FUNC
58  */
59 HWTEST_F(DmsReporterTest, ReportQuerySessionInfo, TestSize.Level1)
60 {
61     int res = 0;
62     DmsReporter dmsReporter;
63     dmsReporter.ReportQuerySessionInfo(true, 0);
64     ASSERT_EQ(res, 0);
65 }
66 
67 /**
68  * @tc.name: ReportContinueApp
69  * @tc.desc: ReportContinueApp test
70  * @tc.type: FUNC
71  */
72 HWTEST_F(DmsReporterTest, ReportContinueApp, TestSize.Level1)
73 {
74     int res = 0;
75     DmsReporter dmsReporter;
76     dmsReporter.ReportContinueApp(true, 0);
77     ASSERT_EQ(res, 0);
78 }
79 
80 } // namespace
81 } // namespace Rosen
82 } // namespace OHOS