2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
26 #define TEST_PKG "org.tizen.tetware"
29 POSITIVE_TC_IDX = 0x01,
33 static void startup(void);
34 static void cleanup(void);
36 static void utc_badge_setting_property_set_n(void);
37 static void utc_badge_setting_property_set_p(void);
38 static void utc_badge_setting_property_get_n(void);
39 static void utc_badge_setting_property_get_p(void);
41 #define TEST_PKG "org.tizen.tetware"
43 void (*tet_startup)(void) = startup;
44 void (*tet_cleanup)(void) = cleanup;
46 struct tet_testlist tet_testlist[] = {
47 {utc_badge_setting_property_set_n, NEGATIVE_TC_IDX},
48 {utc_badge_setting_property_set_p, POSITIVE_TC_IDX},
49 {utc_badge_setting_property_get_n, NEGATIVE_TC_IDX},
50 {utc_badge_setting_property_get_p, POSITIVE_TC_IDX},
54 static void startup(void)
57 tet_printf("\n TC start");
61 static void cleanup(void)
64 tet_printf("\n TC end");
68 * @brief Negative test case of badge_setting_property_set()
70 static void utc_badge_setting_property_set_n(void)
74 ret = badge_setting_property_set(NULL, NULL, NULL);
75 dts_check_eq("badge_setting_property_set", ret, BADGE_ERROR_INVALID_DATA,
76 "Must return BADGE_ERROR_INVALID_DATA in case of invalid parameter");
80 * @brief Positive test case of badge_setting_property_set()
82 static void utc_badge_setting_property_set_p(void)
86 ret = badge_setting_property_set(TEST_PKG, "OPT_BADGE", "ON");
87 /*Invalid parameter test*/
88 dts_check_ne("badge_setting_property_set", ret, BADGE_ERROR_INVALID_DATA,
89 "Must return BADGE_ERROR_NONE in case of valid parameter");
93 * @brief Negative test case of badge_setting_property_get()
95 static void utc_badge_setting_property_get_n(void)
99 ret = badge_setting_property_get(NULL, NULL, NULL);
100 dts_check_eq("badge_setting_property_get", ret, BADGE_ERROR_INVALID_DATA,
101 "Must return BADGE_ERROR_INVALID_DATA in case of invalid parameter");
105 * @brief Positive test case of badge_setting_property_get()
107 static void utc_badge_setting_property_get_p(void)
112 ret = badge_setting_property_get(TEST_PKG, "OPT_BADGE", &value);
113 dts_check_ne("badge_setting_property_get", ret, BADGE_ERROR_INVALID_DATA,
114 "Must return BADGE_ERROR_NONE in case of valid parameter");