1 /*
2 * Copyright (c) 2022 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 "string_ex.h"
17
18 #include "locator_msdp_monitor_manager_test.h"
19
20
21 using namespace testing::ext;
22 namespace OHOS {
23 namespace Location {
24
SetUp()25 void LocatorMsdpMonitorManagerTest::SetUp()
26 {
27 }
28
TearDown()29 void LocatorMsdpMonitorManagerTest::TearDown()
30 {
31 }
32
33 HWTEST_F(LocatorMsdpMonitorManagerTest, RegisterMovementCallBack001, TestSize.Level1)
34 {
35 GTEST_LOG_(INFO)
36 << "WorkRecordTest, RegisterMovementCallBack001, TestSize.Level1";
37 LBSLOGI(LOCATOR, "[WorkRecordTest] RegisterMovementCallBack001 begin");
38 auto locatorMsdpMonitorManager = LocatorMsdpMonitorManager::GetInstance();
39 locatorMsdpMonitorManager->UnRegisterMovementCallBack();
40
41 LBSLOGI(LOCATOR, "[WorkRecordTest] RegisterMovementCallBack001 end");
42 }
43
44 HWTEST_F(LocatorMsdpMonitorManagerTest, UpdateStillMovementState001, TestSize.Level1)
45 {
46 GTEST_LOG_(INFO)
47 << "WorkRecordTest, UpdateStillMovementState001, TestSize.Level1";
48 LBSLOGI(LOCATOR, "[WorkRecordTest] UpdateStillMovementState001 begin");
49 auto locatorMsdpMonitorManager = LocatorMsdpMonitorManager::GetInstance();
50 locatorMsdpMonitorManager->UpdateStillMovementState(true);
51
52 LBSLOGI(LOCATOR, "[WorkRecordTest] UpdateStillMovementState001 end");
53 }
54
55 HWTEST_F(LocatorMsdpMonitorManagerTest, GetStillMovementState001, TestSize.Level1)
56 {
57 GTEST_LOG_(INFO)
58 << "WorkRecordTest, GetStillMovementState001, TestSize.Level1";
59 LBSLOGI(LOCATOR, "[WorkRecordTest] GetStillMovementState001 begin");
60 auto MsdpMotionServiceStatusChange = LocatorMsdpMonitorManager::GetInstance();
61 MsdpMotionServiceStatusChange->GetStillMovementState();
62
63 LBSLOGI(LOCATOR, "[WorkRecordTest] GetStillMovementState001 end");
64 }
65
66 HWTEST_F(LocatorMsdpMonitorManagerTest, OnRemoveSystemAbility001, TestSize.Level1)
67 {
68 GTEST_LOG_(INFO)
69 << "WorkRecordTest, OnRemoveSystemAbility001, TestSize.Level1";
70 LBSLOGI(LOCATOR, "[WorkRecordTest] OnRemoveSystemAbility001 begin");
71 auto locatorMsdpMonitorManager = LocatorMsdpMonitorManager::GetInstance();
72 locatorMsdpMonitorManager->OnRemoveSystemAbility();
73
74 LBSLOGI(LOCATOR, "[WorkRecordTest] OnRemoveSystemAbility001 end");
75 }
76 } // namespace Location
77 } // namespace OHOS