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 "mock_bundle_mgr.h"
18 #include "scan_mdns_service.h"
19 
20 namespace OHOS {
21 namespace Scan {
22 class ScanMdnsServiceTest : public testing::Test {
23 public:
24     static void SetUpTestCase(void);
25     static void TearDownTestCase(void);
26     void SetUp();
27     void TearDown();
28 };
29 
SetUpTestCase(void)30 void ScanMdnsServiceTest::SetUpTestCase(void) {}
31 
TearDownTestCase(void)32 void ScanMdnsServiceTest::TearDownTestCase(void) {}
33 
SetUp(void)34 void ScanMdnsServiceTest::SetUp(void) {}
35 
TearDown(void)36 void ScanMdnsServiceTest::TearDown(void) {}
37 
38 /**
39  * @tc.name: ScanMdnsServiceTest_0001
40  * @tc.desc: Verify the capability function.
41  * @tc.type: FUNC
42  * @tc.require:
43  */
44 HWTEST_F(ScanMdnsServiceTest, ScanMdnsServiceTest_0001, TestSize.Level1)
45 {
46     EXPECT_EQ(ScanMdnsService::OnStartDiscoverService(), true);
47     EXPECT_EQ(ScanMdnsService::OnStopDiscoverService(), true);
48 }
49 
50 /**
51  * @tc.name: ScanMdnsServiceTest_0002
52  * @tc.desc: Verify the capability function.
53  * @tc.type: FUNC
54  * @tc.require:
55  */
56 HWTEST_F(ScanMdnsServiceTest, ScanMdnsServiceTest_0002, TestSize.Level1)
57 {
58     EXPECT_EQ(ScanMdnsService::OnStopDiscoverService(), true);
59 }
60 
61 } // namespace Scan
62 } // namespace OHOS