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 INPUT_EVENT_INTERCEPTOR_TEST_H 17 #define INPUT_EVENT_INTERCEPTOR_TEST_H 18 19 #include <gtest/gtest.h> 20 21 #include "cooperate_context.h" 22 #include "delegate_tasks.h" 23 #include "device_manager.h" 24 #include "drag_manager.h" 25 #include "dsoftbus_adapter.h" 26 #include "i_context.h" 27 #include "input_adapter.h" 28 #include "input_event_interceptor.h" 29 #include "input_event_serialization.h" 30 #include "timer_manager.h" 31 32 #include "intention_service.h" 33 #include "socket_session_manager.h" 34 35 namespace OHOS { 36 namespace Msdp { 37 namespace DeviceStatus { 38 namespace Cooperate { 39 class ContextService final : public IContext { 40 ContextService(); 41 ~ContextService(); 42 DISALLOW_COPY_AND_MOVE(ContextService); 43 public: 44 IDelegateTasks& GetDelegateTasks() override; 45 IDeviceManager& GetDeviceManager() override; 46 ITimerManager& GetTimerManager() override; 47 IDragManager& GetDragManager() override; 48 IPluginManager& GetPluginManager() override; 49 ISocketSessionManager& GetSocketSessionManager() override; 50 IInputAdapter& GetInput() override; 51 IDSoftbusAdapter& GetDSoftbus() override; 52 private: 53 static ContextService* GetInstance(); 54 DelegateTasks delegateTasks_; 55 DeviceManager devMgr_; 56 TimerManager timerMgr_; 57 DragManager dragMgr_; 58 }; 59 60 class InputEventInterceptorTest : public testing::Test { 61 public: 62 static void SetUpTestCase(); 63 static void TearDownTestCase(); 64 void SetUp(); 65 void TearDown(); 66 }; 67 } // namespace Cooperate 68 } // namespace DeviceStatus 69 } // namespace Msdp 70 } // namespace OHOS 71 #endif // INPUT_EVENT_INTERCEPTOR_TEST_H