/* * Copyright (C) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef SOURCE_TEST_H #define SOURCE_TEST_H #include "gtest/gtest.h" #include "source_plugin_mock.h" #include "media_source_mock.h" #include "callback_mock.h" #include "source.h" namespace OHOS { namespace Media { class MockMediaSource; class SourceTest : public testing::Test { public: // SetUpTestCase: Called before all test cases static void SetUpTestCase(void) { } // TearDownTestCase: Called after all test case static void TearDownTestCase(void) { } // SetUp: Called before each test cases void SetUp(void); // TearDown: Called after each test cases void TearDown(void); protected: std::shared_ptr source_ = nullptr; std::shared_ptr mockCallback_ = nullptr; std::shared_ptr mockMediaSource_ = nullptr; std::shared_ptr mockSourcePlugin_ = nullptr; }; } // namespace Media } // namespace OHOS #endif // SOURCE_TEST_H