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 #ifndef OHOS_DMS_SA_CLIENT_TEST_H 17 #define OHOS_DMS_SA_CLIENT_TEST_H 18 19 #include "dms_sa_client.h" 20 21 #include <mutex> 22 23 #include "distributed_event_listener.h" 24 #include "dms_client.h" 25 #include "dms_handler.h" 26 #include "if_system_ability_manager.h" 27 #include "iservice_registry.h" 28 #include "gtest/gtest.h" 29 #include "sam_log.h" 30 #include "system_ability_status_change_stub.h" 31 #include "system_ability_definition.h" 32 33 namespace OHOS { 34 namespace DistributedSchedule { 35 class DmsSaClientTest : public testing::Test { 36 public: 37 static void SetUpTestCase(); 38 static void TearDownTestCase(); 39 void SetUp(); 40 void TearDown(); 41 42 std::shared_ptr<DmsSaClient> dmssaClient_; 43 std::shared_ptr<DmsSystemAbilityStatusChange> dmsSaStatusChange_; 44 }; 45 46 class IDSchedEventListenerTest : public IDSchedEventListener { 47 public: 48 IDSchedEventListenerTest() = default; 49 ~IDSchedEventListenerTest() = default; 50 void DSchedEventNotify(EventNotify ¬ify) override; 51 sptr<IRemoteObject> AsObject() override; 52 }; 53 } // namespace DistributedSchedule 54 } // namespace OHOS 55 #endif // OHOS_DMS_SA_CLIENT_TEST_H