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.
24 #include <notification.h>
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_notification_setting_property_set_n(void);
37 static void utc_notification_setting_property_set_p(void);
38 static void utc_notification_setting_property_get_n(void);
39 static void utc_notification_setting_property_get_p(void);
41 void (*tet_startup)(void) = startup;
42 void (*tet_cleanup)(void) = cleanup;
44 struct tet_testlist tet_testlist[] = {
45 {utc_notification_setting_property_set_n, NEGATIVE_TC_IDX},
46 {utc_notification_setting_property_set_p, POSITIVE_TC_IDX},
47 {utc_notification_setting_property_get_n, NEGATIVE_TC_IDX},
48 {utc_notification_setting_property_get_p, POSITIVE_TC_IDX},
52 static void startup(void)
55 notification_clear(NOTIFICATION_TYPE_NONE);
56 tet_printf("\n TC start");
60 static void cleanup(void)
63 tet_printf("\n TC end");
67 * @brief Negative test case of notification_setting_property_set()
69 static void utc_notification_setting_property_set_n(void)
73 ret = notification_setting_property_set(NULL, NULL, NULL);
74 dts_check_eq("notification_setting_property_set", ret, NOTIFICATION_ERROR_INVALID_DATA,
75 "Must return NOTIFICATION_ERROR_INVALID_DATA in case of invalid parameter");
79 * @brief Positive test case of notification_setting_property_set()
81 static void utc_notification_setting_property_set_p(void)
85 ret = notification_setting_property_set(TEST_PKG, "OPT_NOTIFICATION", "ON");
86 /*Invalid parameter test*/
87 dts_check_ne("notification_setting_property_set", ret, NOTIFICATION_ERROR_INVALID_DATA,
88 "Must return NOTIFICATION_ERROR_NONE in case of valid parameter");
92 * @brief Negative test case of notification_setting_property_get()
94 static void utc_notification_setting_property_get_n(void)
98 ret = notification_setting_property_get(NULL, NULL, NULL);
99 dts_check_eq("notification_setting_property_get", ret, NOTIFICATION_ERROR_INVALID_DATA,
100 "Must return NOTIFICATION_ERROR_INVALID_DATA in case of invalid parameter");
104 * @brief Positive test case of notification_setting_property_get()
106 static void utc_notification_setting_property_get_p(void)
111 ret = notification_setting_property_get(TEST_PKG, "OPT_NOTIFICATION", &value);
112 dts_check_ne("notification_setting_property_get", ret, NOTIFICATION_ERROR_INVALID_DATA,
113 "Must return NOTIFICATION_ERROR_NONE in case of valid parameter");