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 #ifndef SERVICES_DTBSCHEDMGR_TEST_UNITTEST_MISSION_DMS_MISSION_MANAGER_TEST_H 17 #define SERVICES_DTBSCHEDMGR_TEST_UNITTEST_MISSION_DMS_MISSION_MANAGER_TEST_H 18 19 #include "gtest/gtest.h" 20 21 #include "distributed_sched_interface.h" 22 #include "remote_mission_listener_stub.h" 23 24 namespace OHOS { 25 namespace DistributedSchedule { 26 class DMSMissionManagerTest : public testing::Test { 27 public: 28 static void SetUpTestCase(); 29 static void TearDownTestCase(); 30 void SetUp() override; 31 void TearDown() override; 32 protected: 33 std::string localDeviceId_; 34 std::u16string u16localDeviceId_; 35 sptr<IDistributedSched> proxy_; 36 sptr<IDistributedSched> GetDms(); 37 }; 38 39 class RemoteMissionListenerTest : public AAFwk::RemoteMissionListenerStub { 40 public: 41 void NotifyMissionsChanged(const std::string& deviceId) override; 42 void NotifySnapshot(const std::string& deviceId, int32_t missionId) override; 43 void NotifyNetDisconnect(const std::string& deviceId, int32_t state) override; 44 }; 45 } // namespace DistributedSchedule 46 } // namespace OHOS 47 #endif /* SERVICES_DTBSCHEDMGR_TEST_UNITTEST_MISSION_DMS_MISSION_MANAGER_TEST_H */ 48