[UTC][Notification][ACR-881]Add tcs for extension_image_size
authorMyungki Lee <mk5004.lee@samsung.com>
Fri, 17 Mar 2017 08:00:43 +0000 (17:00 +0900)
committerMyungki Lee <mk5004.lee@samsung.com>
Fri, 17 Mar 2017 08:00:43 +0000 (17:00 +0900)
Change-Id: I76d36161db3c7c3146e3cdee49b0dc32c6d36585
Signed-off-by: Myungki Lee <mk5004.lee@samsung.com>
src/utc/notification/tct-notification-core_common_iot.h
src/utc/notification/tct-notification-core_mobile.h
src/utc/notification/tct-notification-core_tv.h
src/utc/notification/tct-notification-core_wearable.h
src/utc/notification/utc-notification.c

index 094229537ae1bce533e9001fbe3a0753a3aa7ef6..81774d29bad84ee33442a361643bbdce4e2dc700 100755 (executable)
@@ -259,6 +259,10 @@ extern int notification_get_noti_block_state_n(void);
 extern int notification_get_noti_block_state_p(void);
 extern int utc_notification_set_text_input_n(void);
 extern int utc_notification_set_text_input_p(void);
+extern int utc_notification_set_extension_image_size_n(void);
+extern int utc_notification_set_extension_image_size_p(void);
+extern int utc_notification_get_extension_image_size_n(void);
+extern int utc_notification_get_extension_image_size_p(void);
 
 testcase tc_array[] = {
     {"utc_notification_create_1_n", utc_notification_create_1_n, NULL, NULL},
@@ -498,6 +502,10 @@ testcase tc_array[] = {
     {"notification_get_noti_block_state_p", notification_get_noti_block_state_p, NULL, NULL},
     {"utc_notification_set_text_input_n", utc_notification_set_text_input_n, NULL, NULL},
     {"utc_notification_set_text_input_p", utc_notification_set_text_input_p, NULL, NULL},
+    {"utc_notification_set_extension_image_size_n", utc_notification_set_extension_image_size_n, NULL, NULL},
+    {"utc_notification_set_extension_image_size_p", utc_notification_set_extension_image_size_p, NULL, NULL},
+    {"utc_notification_get_extension_image_size_n", utc_notification_get_extension_image_size_n, NULL, NULL},
+    {"utc_notification_get_extension_image_size_p", utc_notification_get_extension_image_size_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 094229537ae1bce533e9001fbe3a0753a3aa7ef6..81774d29bad84ee33442a361643bbdce4e2dc700 100755 (executable)
@@ -259,6 +259,10 @@ extern int notification_get_noti_block_state_n(void);
 extern int notification_get_noti_block_state_p(void);
 extern int utc_notification_set_text_input_n(void);
 extern int utc_notification_set_text_input_p(void);
+extern int utc_notification_set_extension_image_size_n(void);
+extern int utc_notification_set_extension_image_size_p(void);
+extern int utc_notification_get_extension_image_size_n(void);
+extern int utc_notification_get_extension_image_size_p(void);
 
 testcase tc_array[] = {
     {"utc_notification_create_1_n", utc_notification_create_1_n, NULL, NULL},
@@ -498,6 +502,10 @@ testcase tc_array[] = {
     {"notification_get_noti_block_state_p", notification_get_noti_block_state_p, NULL, NULL},
     {"utc_notification_set_text_input_n", utc_notification_set_text_input_n, NULL, NULL},
     {"utc_notification_set_text_input_p", utc_notification_set_text_input_p, NULL, NULL},
+    {"utc_notification_set_extension_image_size_n", utc_notification_set_extension_image_size_n, NULL, NULL},
+    {"utc_notification_set_extension_image_size_p", utc_notification_set_extension_image_size_p, NULL, NULL},
+    {"utc_notification_get_extension_image_size_n", utc_notification_get_extension_image_size_n, NULL, NULL},
+    {"utc_notification_get_extension_image_size_p", utc_notification_get_extension_image_size_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 094229537ae1bce533e9001fbe3a0753a3aa7ef6..81774d29bad84ee33442a361643bbdce4e2dc700 100755 (executable)
@@ -259,6 +259,10 @@ extern int notification_get_noti_block_state_n(void);
 extern int notification_get_noti_block_state_p(void);
 extern int utc_notification_set_text_input_n(void);
 extern int utc_notification_set_text_input_p(void);
+extern int utc_notification_set_extension_image_size_n(void);
+extern int utc_notification_set_extension_image_size_p(void);
+extern int utc_notification_get_extension_image_size_n(void);
+extern int utc_notification_get_extension_image_size_p(void);
 
 testcase tc_array[] = {
     {"utc_notification_create_1_n", utc_notification_create_1_n, NULL, NULL},
@@ -498,6 +502,10 @@ testcase tc_array[] = {
     {"notification_get_noti_block_state_p", notification_get_noti_block_state_p, NULL, NULL},
     {"utc_notification_set_text_input_n", utc_notification_set_text_input_n, NULL, NULL},
     {"utc_notification_set_text_input_p", utc_notification_set_text_input_p, NULL, NULL},
+    {"utc_notification_set_extension_image_size_n", utc_notification_set_extension_image_size_n, NULL, NULL},
+    {"utc_notification_set_extension_image_size_p", utc_notification_set_extension_image_size_p, NULL, NULL},
+    {"utc_notification_get_extension_image_size_n", utc_notification_get_extension_image_size_n, NULL, NULL},
+    {"utc_notification_get_extension_image_size_p", utc_notification_get_extension_image_size_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 094229537ae1bce533e9001fbe3a0753a3aa7ef6..81774d29bad84ee33442a361643bbdce4e2dc700 100755 (executable)
@@ -259,6 +259,10 @@ extern int notification_get_noti_block_state_n(void);
 extern int notification_get_noti_block_state_p(void);
 extern int utc_notification_set_text_input_n(void);
 extern int utc_notification_set_text_input_p(void);
+extern int utc_notification_set_extension_image_size_n(void);
+extern int utc_notification_set_extension_image_size_p(void);
+extern int utc_notification_get_extension_image_size_n(void);
+extern int utc_notification_get_extension_image_size_p(void);
 
 testcase tc_array[] = {
     {"utc_notification_create_1_n", utc_notification_create_1_n, NULL, NULL},
@@ -498,6 +502,10 @@ testcase tc_array[] = {
     {"notification_get_noti_block_state_p", notification_get_noti_block_state_p, NULL, NULL},
     {"utc_notification_set_text_input_n", utc_notification_set_text_input_n, NULL, NULL},
     {"utc_notification_set_text_input_p", utc_notification_set_text_input_p, NULL, NULL},
+    {"utc_notification_set_extension_image_size_n", utc_notification_set_extension_image_size_n, NULL, NULL},
+    {"utc_notification_set_extension_image_size_p", utc_notification_set_extension_image_size_p, NULL, NULL},
+    {"utc_notification_get_extension_image_size_n", utc_notification_get_extension_image_size_n, NULL, NULL},
+    {"utc_notification_get_extension_image_size_p", utc_notification_get_extension_image_size_p, NULL, NULL},
     {NULL, NULL}
 };
 
index d79a64901b060c1eaf3e0e8be4d54376594f695b..db12021c8a5d0f50b68c50155ed6a6f5509738b8 100755 (executable)
@@ -5339,3 +5339,91 @@ int utc_notification_set_text_input_p(void)
 
        return 0;
 }
+
+/**
+ * @testcase           notification_set_extension_image_size_n
+ * @since_tizen                4.0
+ * @description                Negative test case of notification_set_extension_image_size()
+ */
+int utc_notification_set_extension_image_size_n(void)
+{
+       int ret = 0;
+
+       ret = notification_set_extension_image_size(NULL, -1);
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       return 0;
+}
+
+/**
+ * @testcase           notification_set_extension_image_size_p
+ * @since_tizen                4.0
+ * @description                Positive test case of notification_set_extension_image_size()
+ */
+int utc_notification_set_extension_image_size_p(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_extension_image_size(notification, 20);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       notification_free(notification);
+
+       return 0;
+}
+
+/**
+ * @testcase           notification_get_extension_image_size_n
+ * @since_tizen                4.0
+ * @description                Negative test case of notification_get_extension_image_size()
+ */
+int utc_notification_get_extension_image_size_n(void)
+{
+       int ret = 0;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_extension_image_size(notification, 20);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = notification_get_extension_image_size(NULL, NULL);
+       assert_eq(ret, NOTIFICATION_ERROR_INVALID_PARAMETER);
+
+       notification_free(notification);
+
+       return 0;
+}
+
+/**
+ * @testcase           notification_get_extension_image_size_p
+ * @since_tizen                4.0
+ * @description                Positive test case of notification_get_extension_image_size()
+ */
+int utc_notification_get_extension_image_size_p(void)
+{
+       int ret = 0;
+       int size;
+       notification_h notification = NULL;
+
+       notification = notification_create(NOTIFICATION_TYPE_NOTI);
+
+       assert(notification);
+
+       ret = notification_set_extension_image_size(notification, 20);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       ret = notification_get_extension_image_size(notification, &size);
+       assert_eq(ret, NOTIFICATION_ERROR_NONE);
+
+       notification_free(notification);
+
+       return 0;
+}