• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 "UTTest_dm_device_info_manager.h"
17 
18 #include "dm_constants.h"
19 #include "dm_log.h"
20 
21 namespace OHOS {
22 namespace DistributedHardware {
SetUp()23 void DeviceManagerImplTest::SetUp()
24 {
25 }
26 
TearDown()27 void DeviceManagerImplTest::TearDown()
28 {
29 }
30 
SetUpTestCase()31 void DeviceManagerImplTest::SetUpTestCase()
32 {
33 }
34 
TearDownTestCase()35 void DeviceManagerImplTest::TearDownTestCase()
36 {
37 }
38 
39 namespace {
40 std::shared_ptr<SoftbusConnector> softbusConnector = std::make_shared<SoftbusConnector>();
41 std::shared_ptr<DeviceManagerServiceListener> listener_ = std::make_shared<DeviceManagerServiceListener>();
42 std::shared_ptr<DmDeviceInfoManager> dmDeviceStateManager = std::make_shared<DmDeviceInfoManager>(softbusConnector);
43 
44 /**
45  * @tc.name: DmDeviceInfoManager_001
46  * @tc.desc:  Returns a new pointer to the constructor DmDeviceInfoManager new
47  * to construct an environment where the device has been discovered, and stop discovering
48  * the device. Its return value is DM_INPUT_PARA_EMPTY
49  * @tc.type: FUNC
50  * @tc.require: AR000GHSJK
51  */
52 HWTEST_F(DeviceManagerImplTest, DmDeviceInfoManager_001, testing::ext::TestSize.Level0)
53 {
54     std::shared_ptr<DmDeviceInfoManager> p = std::make_shared<DmDeviceInfoManager>(softbusConnector);
55     ASSERT_NE(p, nullptr);
56 }
57 } // namespace
58 } // namespace DistributedHardware
59 } // namespace OHOS