4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hyunjun Ko <zzoon.ko@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
23 * @file utc_thumbnail_request_from_db_func.c
24 * @brief This is a suit of unit test cases to test thumbnail_request_from_db API function
26 * @version Initial Creation Version 0.1
30 #include "utc_thumbnail_request_from_db_func.h"
34 * @brief This tests int thumbnail_request_from_db() API with valid parameters
35 * @par ID utc_thumbnail_request_from_db_func_01
37 * @return This function returns zero on success, or negative value with error code
39 void utc_thumbnail_request_from_db_func_01()
43 const char *origin_path = "/opt/media/Images and videos/Wallpapers/Home_default.png";
44 char thumb_path[1024] = {0,};
46 ret = thumbnail_request_from_db(origin_path, thumb_path, sizeof(thumb_path));
48 if (ret < MEDIA_THUMB_ERROR_NONE) {
49 UTC_THUMB_LOG( "unable to get thumbnail from thumb-daemon. error code->%d", ret);
61 * @brief This tests int thumbnail_request_from_db() API with invalid parameters
62 * @par ID utc_thumbnail_request_from_db_func_02
64 * @return error code on success
66 void utc_thumbnail_request_from_db_func_02()
70 const char *origin_path = NULL;
71 char thumb_path[1024] = {0,};
73 ret = thumbnail_request_from_db(origin_path, thumb_path, sizeof(thumb_path));
75 if (ret < MEDIA_THUMB_ERROR_NONE) {
76 UTC_THUMB_LOG("abnormal condition test for null, error code->%d", ret);
79 UTC_THUMB_LOG("Getting thumbnail from thumb-daemon should be failed because the origin_path is NULL");