1 /* 2 * Copyright (c) 2023 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 <gtest/gtest.h> 17 #include "interfaces/include/ws_common.h" 18 #include "session_manager/include/scene_session_manager.h" 19 #include "session_info.h" 20 #include "session/host/include/scene_session.h" 21 #include "window_manager_agent.h" 22 #include "session_manager.h" 23 #include "scene_session_converter.h" 24 #include "zidl/window_manager_agent_interface.h" 25 26 using namespace testing; 27 using namespace testing::ext; 28 29 namespace OHOS { 30 namespace Rosen { 31 class SceneSessionConverterTest : public testing::Test { 32 public: 33 static void SetUpTestCase(); 34 static void TearDownTestCase(); 35 void SetUp() override; 36 void TearDown() override; 37 }; 38 SetUpTestCase()39void SceneSessionConverterTest::SetUpTestCase() 40 { 41 } 42 TearDownTestCase()43void SceneSessionConverterTest::TearDownTestCase() 44 { 45 } 46 SetUp()47void SceneSessionConverterTest::SetUp() 48 { 49 } 50 TearDown()51void SceneSessionConverterTest::TearDown() 52 { 53 } 54 55 namespace { 56 57 /** 58 * @tc.name: ConvertToMissionInfos 59 * @tc.desc: ConvertToMissionInfos func 60 * @tc.type: FUNC 61 */ 62 HWTEST_F(SceneSessionConverterTest, ConvertToMissionInfos_EmptyInput, Function | SmallTest | Level1) 63 { 64 std::vector<sptr<SceneSession>> sceneSessionInfos; 65 std::vector<AAFwk::MissionInfo> missionInfos; 66 auto result = SceneSessionConverter::ConvertToMissionInfos(sceneSessionInfos, missionInfos); 67 ASSERT_EQ(WSError::WS_OK, result); 68 } 69 70 } 71 } // namespace Rosen 72 } // namespace OHOS 73