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 #ifndef AVMETADATA_UNIT_TEST_H 16 #define AVMETADATA_UNIT_TEST_H 17 18 #include "gtest/gtest.h" 19 #include "avmetadata_mock.h" 20 21 namespace OHOS { 22 namespace Media { 23 class AVMetadataUnitTest : public testing::Test { 24 public: 25 // SetUpTestCase: before all testcases SetUpTestCase(void)26 static void SetUpTestCase(void) 27 { 28 UNITTEST_INFO_LOG("AVMetadataUnitTest::SetUpTestCase"); 29 }; 30 // TearDownTestCase: after all testcase TearDownTestCase(void)31 static void TearDownTestCase(void) 32 { 33 UNITTEST_INFO_LOG("AVMetadataUnitTest::TearDownTestCase"); 34 }; 35 // SetUp SetUp(void)36 void SetUp(void) 37 { 38 testInfo_ = ::testing::UnitTest::GetInstance()->current_test_info(); 39 UNITTEST_INFO_LOG("AVMetadataUnitTest::SetUp"); 40 }; 41 // TearDown TearDown(void)42 void TearDown(void) 43 { 44 UNITTEST_INFO_LOG("AVMetadataUnitTest::TearDown"); 45 }; 46 void CheckMeta(std::string uri, std::unordered_map<int32_t, std::string> expectMeta); 47 void GetThumbnail(const std::string uri); 48 const ::testing::TestInfo *testInfo_ = nullptr; 49 }; 50 } 51 } 52 #endif 53