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 #define LOG_TAG "VideoTest"
16
17 #include <unistd.h>
18 #include <gtest/gtest.h>
19 #include <string>
20
21 #include "logger.h"
22 #include "udmf_capi_common.h"
23 #include "video.h"
24
25 using namespace testing::ext;
26 using namespace OHOS::UDMF;
27 using namespace OHOS;
28 namespace OHOS::Test {
29 using namespace std;
30
31 class VideoTest : public testing::Test {
32 public:
33 static void SetUpTestCase();
34 static void TearDownTestCase();
35 void SetUp() override;
36 void TearDown() override;
37 };
38
SetUpTestCase()39 void VideoTest::SetUpTestCase()
40 {
41 }
42
TearDownTestCase()43 void VideoTest::TearDownTestCase()
44 {
45 }
46
SetUp()47 void VideoTest::SetUp()
48 {
49 }
50
TearDown()51 void VideoTest::TearDown()
52 {
53 }
54
55 /**
56 * @tc.name: Video001
57 * @tc.desc: Normal testcase of Video
58 * @tc.type: FUNC
59 */
HWTEST_F(VideoTest, Video001, TestSize.Level1)60 HWTEST_F(VideoTest, Video001, TestSize.Level1)
61 {
62 LOG_INFO(UDMF_TEST, "Video001 begin.");
63 UDType type = UDType::ENTITY;
64 ValueType value = 0;
65 Video video(type, value);
66 EXPECT_EQ(video.dataType_, VIDEO);
67 LOG_INFO(UDMF_TEST, "Video001 end.");
68 }
69 } // OHOS::Test