--- /dev/null
+//
+// Copyright (c) 2019 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "ITs-notification-common.h"
+
+/** @addtogroup itc-notification_ex
+* @ingroup itc
+* @{
+*/
+
+//& set: notification-ex
+
+/****************************************************Callback Start****************************************************/
+
+/**
+* @function NotiExItemGroupForeachChildCb
+* @description Callback Function
+* @parameters noti_ex_item_h hItem, void *pszData
+* @return int
+*/
+static int NotiExItemGroupForeachChildCb(noti_ex_item_h hItem, void *pszData)
+{
+ int nRet;
+ char *pszGetID = NULL;
+ g_CallBackHit = false;
+
+ FPRINTF("[Line : %d][%s] NotiExItemGroupForeachChildCb Callback Invoked\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+
+ nRet = noti_ex_item_get_id(hItem, &pszGetID);
+ if (nRet != NOTI_EX_ERROR_NONE)
+ {
+ FPRINTF("[Line : %d][%s] Error in running API noti_ex_item_get_id\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ if ( strncmp(pszGetID, g_pszButtonID, sizeof(g_pszButtonID)-1) )
+ {
+ FPRINTF("[Line : %d][%s] Chiled id [%s] but recieved id is [%s] \\n", __LINE__, API_NAMESPACE, g_pszButtonID, pszGetID);
+ return 1;
+ }
+ return 0;
+}
+
+void EventinfoManagerEventsErrorCB(noti_ex_reporter_h hNotiReporter, noti_ex_error_e eNotiError, int nReqID, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void EventinfoGettestEventsAddCB(noti_ex_manager_h hNotiManager, noti_ex_event_info_h hNotiInfo, noti_ex_item_h *hNotiItem, int nCount, void *pszData)
+{
+ int nRet;
+ noti_ex_event_info_type_e eEventInfoType;
+ noti_ex_event_info_h hEventInfo = NULL;
+ char *pszOwner = NULL;
+ char *pszChannel = NULL;
+ char *pszItemID = NULL;
+ int nReqID;
+
+ g_CallBackHit = false;
+ g_bAPIFailed = false;
+
+ FPRINTF("[Line : %d][%s] EventinfoGettestEventsAddCB callback hit \\n", __LINE__, API_NAMESPACE);
+
+ if(EX_EVENT_INFO_CLONE == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_clone(hNotiInfo, &hEventInfo);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_clone", NotificationExGetError(nRet));
+ }
+
+ if(EX_EVENT_INFO_GET_EVENT_TYPE == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_get_event_type(hNotiInfo, &eEventInfoType);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_get_event_type", NotificationExGetError(nRet));
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_EVENT_POST, eEventInfoType, "noti_ex_event_info_get_event_type", "Error: Event infor type is not NOTI_EX_EVENT_POST");
+ }
+
+ if(EX_EVENT_INFO_GET_OWNER == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_get_owner(hNotiInfo, &pszOwner);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_get_owner", NotificationExGetError(nRet));
+ FREE_MEMORY(pszOwner);
+ }
+
+ if(EX_EVENT_INFO_GET_CHANNEL == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_get_channel(hNotiInfo, &pszChannel);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_get_channel", NotificationExGetError(nRet));
+ FREE_MEMORY(pszChannel);
+ }
+
+ if(EX_EVENT_INFO_GET_ITEM_ID == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_get_item_id(hNotiInfo, &pszItemID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_get_item_id", NotificationExGetError(nRet));
+ FREE_MEMORY(pszItemID);
+ }
+
+ if(EX_EVENT_INFO_GET_REQUEST_ID == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_get_request_id(hNotiInfo, &nReqID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_get_request_id", NotificationExGetError(nRet));
+ }
+
+ if(EX_EVENT_INFO_DESTROY == g_eEventInfoAPI)
+ {
+ nRet = noti_ex_event_info_destroy(hEventInfo);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_event_info_destroy", NotificationExGetError(nRet));
+ }
+
+ nRet = noti_ex_manager_delete_all(g_hEventinfoManager, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_delete_all", NotificationExGetError(nRet));
+
+ g_CallBackHit = true;
+}
+
+void ManagerEventsAddCB(noti_ex_manager_h hManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] ManagerEventsAddCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void ManagerEventsUpdateCB(noti_ex_manager_h hManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h hUpdatedItem, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] ManagerEventsUpdateCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void ManagerEventsDeleteCB(noti_ex_manager_h hManager, noti_ex_event_info_h hEventnfo, noti_ex_item_h hDeletedItem, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] ManagerEventsDeleteCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void ManagerEventsErrorCB(noti_ex_manager_h hManager, noti_ex_error_e eNotiError, int nReqID, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] ManagerEventsErrorCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void GettestEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ noti_ex_item_h *hItems;
+ int nItemsCnt;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ g_bAPIFailed = false;
+ g_CallBackHit = true;
+ FPRINTF("[Line : %d][%s] GettestEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+
+ nRet = noti_ex_manager_get(hExManager, &hItems, &nItemsCnt);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_get", NotificationExGetError(nRet));
+ PRINT_RESULT_CALLBACK_NORETURN(1, nItemsCnt, "noti_ex_manager_get", "nItemsCnt is different than 1");
+
+ nRet = noti_ex_manager_delete_all(g_hExManager, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_delete_all", NotificationExGetError(nRet));
+}
+
+void DeletetestEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hDeletedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] DeletetestEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_manager_delete_all(g_hExManager, &nReqID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_delete_all", NotificationExGetError(nRet));
+}
+
+void SendErrorEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] SendErrorEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_manager_send_error(g_hExManager, hEventInfo, NOTI_EX_ERROR_INVALID_PARAMETER);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_send_error", NotificationExGetError(nRet));
+
+ nRet = noti_ex_manager_delete_all(g_hExManager, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_delete_all", NotificationExGetError(nRet));
+}
+
+void ReporterEventsEventCB(noti_ex_reporter_h hExReporter, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ g_CallBackHit = true;
+#if DEBUG
+ FPRINTF("[Line : %d][%s] ReporterEventsEventCB Callback Invoked\\n", __LINE__, API_NAMESPACE);
+#endif
+}
+
+void SendErrorManagerEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] SendErrorManagerEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_manager_update(g_hExManager, hAddedItem[0], &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_update", NotificationExGetError(nRet));
+}
+
+void SendErrorEventsEventCB(noti_ex_reporter_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] SendErrorEventsEventCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_reporter_send_error(g_hEventinfoReporter, hEventInfo, NOTI_EX_ERROR_IO_ERROR);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_send_error", NotificationExGetError(nRet));
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+void PostEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] PostEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+void PostEventsListAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] PostEventsListAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+void UpdateEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] UpdateEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_reporter_update(g_hEventinfoReporter, hAddedItem[0], &nReqID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_update", NotificationExGetError(nRet));
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+void DeleteEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] DeleteEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_reporter_delete(g_hEventinfoReporter, hAddedItem[0], &nReqID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete", NotificationExGetError(nRet));
+}
+
+void DeleteallEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ FPRINTF("[Line : %d][%s] DeleteallEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+void FindbyrootidEventsAddCB(noti_ex_manager_h hExManager, noti_ex_event_info_h hEventInfo, noti_ex_item_h *hAddedItem, int nCnt, void *pszData)
+{
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItem;
+
+ FPRINTF("[Line : %d][%s] FindbyrootidEventsAddCB Callback hit\\n", __LINE__, API_NAMESPACE);
+ g_CallBackHit = true;
+ g_bAPIFailed = false;
+
+ nRet = noti_ex_reporter_find_by_root_id(g_hEventinfoReporter, "testgroup", &hItem);
+ PRINT_RESULT_CALLBACK_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_find_by_root_id", NotificationExGetError(nRet));
+
+ nRet = noti_ex_reporter_delete_all(g_hEventinfoReporter, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_delete_all", NotificationExGetError(nRet));
+}
+
+/*****************************************************Callback End*****************************************************/
+
+/**
+* @function ITs_notification_ex_startup
+* @description Called before each test
+* @parameter NA
+* @return NA
+*/
+void ITs_notification_ex_startup(void)
+{
+ struct stat stBuff;
+ if ( stat(ERR_LOG, &stBuff) == 0 )
+ {
+ remove(ERR_LOG);
+ }
+#if DEBUG
+ FPRINTF("[Line : %d][%s] TEST SUIT start-up: ITs_notification_ex_startup \\n", __LINE__, API_NAMESPACE);
+#endif
+ return;
+}
+
+/**
+* @function ITs_notification_ex_cleanup
+* @description Called after each test
+* @parameter NA
+* @return NA
+*/
+void ITs_notification_ex_cleanup(void)
+{
+#if DEBUG
+ FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_notification_ex_cleanup \\n", __LINE__, API_NAMESPACE);
+#endif
+ return;
+}
+
+/** @addtogroup itc-notification-ex-testcases
+* @brief Integration testcases for module notification-ex
+* @ingroup itc-notification-ex
+* @{
+*/
+
+//& type : auto
+//& purpose: Creates a notification app control.
+/**
+* @testcase ITc_noti_ex_action_app_control_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates notification-ex app control handler.
+* @scenario Create notification\n
+* Check return value and also check handle is null or not.
+* @apicovered noti_ex_action_app_control_create
+* @passcase noti_ex_action_app_control_create is successful and return correct value
+* @failcase noti_ex_action_app_control_create gets failed or return null value
+* @precondition Create app control and set app id to a dummy app id.
+* @postcondition Destroy app control and app control action handler.
+*/
+int ITc_noti_ex_action_app_control_create_p(void)
+{
+ START_TEST;
+
+ int nRet = APP_CONTROL_ERROR_NONE;
+ app_control_h hAppControl;
+ noti_ex_action_h hAction = NULL;
+
+ nRet = app_control_create(&hAppControl);
+ PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_create", Application_AppControlGetError(nRet));
+ CHECK_HANDLE(hAppControl, "app_control_create");
+
+ const char* pszSetAppID = "org.tizen.app"; //dummy app id
+ nRet = app_control_set_app_id(hAppControl, pszSetAppID);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", Application_AppControlGetError(nRet), app_control_destroy(hAppControl));
+
+ if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
+ {
+ app_control_destroy(hAppControl);
+ return 1;
+ }
+
+ //Target API
+ nRet = noti_ex_action_app_control_create(&hAction, hAppControl, NULL);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_app_control_create", NotificationExGetError(nRet), app_control_destroy(hAppControl));
+ CHECK_HANDLE_CLEANUP(hAction, "noti_ex_action_app_control_create", app_control_destroy(hAppControl));
+
+ nRet = app_control_destroy(hAppControl);
+ PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", Application_AppControlGetError(nRet));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets new app control handle from action
+/**
+* @testcase ITc_noti_ex_action_app_control_set_get_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets new app control handle from action.
+* @scenario Create notification\n
+* Gets new app control from action handler and check for Pass/Fail.
+* @apicovered noti_ex_action_app_control_set, noti_ex_action_app_control_get
+* @passcase noti_ex_action_app_control_set, noti_ex_action_app_control_get are successful and return correct value
+* @failcase noti_ex_action_app_control_set, noti_ex_action_app_control_get gets failed or return null value
+* @precondition Create app control and set app id to a dummy app id.
+* @postcondition Destroy app control and app control action handler.
+*/
+int ITc_noti_ex_action_app_control_set_get_p(void)
+{
+ START_TEST;
+
+ int nRet = APP_CONTROL_ERROR_NONE;
+ app_control_h hAppControl;
+ app_control_h hAppControlSet;
+ app_control_h hAppControlGet = NULL;
+ noti_ex_action_h hAction = NULL;
+
+ nRet = app_control_create(&hAppControl);
+ PRINT_RESULT(APP_CONTROL_ERROR_NONE, nRet, "app_control_create", Application_AppControlGetError(nRet));
+ CHECK_HANDLE(hAppControl, "app_control_create");
+
+ const char* pszSetAppID = "org.tizen.app"; //dummy app id
+ nRet = app_control_set_app_id(hAppControl, pszSetAppID);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", Application_AppControlGetError(nRet), app_control_destroy(hAppControl));
+
+ if ( false == CreateNotification(NOTIFICATION_TYPE_NOTI) )
+ {
+ app_control_destroy(hAppControl);
+ return 1;
+ }
+
+ nRet = noti_ex_action_app_control_create(&hAction, hAppControl, NULL);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_app_control_create", NotificationExGetError(nRet), app_control_destroy(hAppControl));
+ CHECK_HANDLE_CLEANUP(hAction, "noti_ex_action_app_control_creat", app_control_destroy(hAppControl));
+
+ nRet = app_control_create(&hAppControlSet);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_create", Application_AppControlGetError(nRet), app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+ CHECK_HANDLE_CLEANUP(hAppControlSet, "app_control_create", app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+
+ const char* pNewAppID = "org.tizen.newapp"; //dummy app id
+ nRet = app_control_set_app_id(hAppControlSet, pNewAppID);
+ PRINT_RESULT_CLEANUP(APP_CONTROL_ERROR_NONE, nRet, "app_control_set_app_id", Application_AppControlGetError(nRet), app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+
+ //Target API
+ nRet = noti_ex_action_app_control_set(hAction, hAppControlSet);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_app_control_set", NotificationExGetError(nRet), app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+
+ //Target API
+ nRet = noti_ex_action_app_control_get(hAction, &hAppControlGet);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_app_control_get", NotificationExGetError(nRet), app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+ CHECK_HANDLE_CLEANUP(hAppControlGet, "noti_ex_action_app_control_get", app_control_destroy(hAppControl); noti_ex_action_destroy(hAction));
+
+ nRet = app_control_destroy(hAppControl);
+ PRINT_RESULT_NORETURN(APP_CONTROL_ERROR_NONE, nRet, "app_control_destroy", Application_AppControlGetError(nRet));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and delete the notification_ex action handle to control visibility
+/**
+* @testcase ITc_noti_ex_action_visibility_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and delete the notification_ex action handle to control visibility.
+* @scenario Creates the notification_ex action handle to control visibility\n
+* and delete created handle, check handle for Pass/Fail.
+* @apicovered noti_ex_action_visibility_create, noti_ex_action_destroy
+* @passcase noti_ex_action_visibility_create, noti_ex_action_destroy is successful and return correct value
+* @failcase noti_ex_action_visibility_create, noti_ex_action_destroy failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_visibility_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+ const char* pszExtra = "extra";
+
+ //Target API
+ nRet = noti_ex_action_visibility_create(&hAction, pszExtra);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+
+//& type : auto
+//& purpose: Sets the visibility state for notification_ex item.
+/**
+* @testcase ITc_noti_ex_action_visibility_set_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets the visibility state for notification_ex item.
+* @scenario Creates the notification_ex action handle to control visibility\n
+* Sets the visibility state for notification_ex item and check for Pass/Fail.
+* @apicovered noti_ex_action_visibility_set
+* @passcase noti_ex_action_visibility_set is successful and return correct value
+* @failcase noti_ex_action_visibility_set failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_visibility_set_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+ const char* pszExtra = "extra";
+ const char* pszID = "textID";
+ bool bIsVisible = true;
+
+ nRet = noti_ex_action_visibility_create(&hAction, pszExtra);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ //Target API
+ nRet = noti_ex_action_visibility_set(hAction, pszID, bIsVisible);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_set", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the type of an action. The action type is equal to one of the values of #noti_ex_action_type_e.
+/**
+* @testcase ITc_noti_ex_action_get_type_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the type of an action. The action type is equal to one of the values of #noti_ex_action_type_e.
+* @scenario Creates the notification_ex action handle and Gets the type of an action\n
+* Check for Pass/Fail.
+* @apicovered noti_ex_action_get_type
+* @passcase noti_ex_action_get_type is successful and return correct value
+* @failcase noti_ex_action_get_type failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_get_type_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+ const char* pszExtra = "extra";
+ int nType;
+
+ nRet = noti_ex_action_visibility_create(&hAction, pszExtra);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ //Target API
+ nRet = noti_ex_action_get_type(hAction, &nType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_get_type", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
+ PRINT_RESULT_CLEANUP(NOTI_EX_ACTION_TYPE_VISIBILITY, nType, "noti_ex_action_get_type", "return type of action handle is different", noti_ex_action_destroy(hAction));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the local state of an action.
+/**
+* @testcase ITc_noti_ex_action_is_local_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the local state of an action.
+* @scenario Creates the notification_ex action handle and Gets the local state of an action\n
+* Check for Pass/Fail.
+* @apicovered noti_ex_action_is_local
+* @passcase noti_ex_action_is_local is successful and return correct value
+* @failcase noti_ex_action_is_local failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_is_local_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+ bool bIsLocal = false;
+
+ nRet = noti_ex_action_visibility_create(&hAction, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ //Target API
+ nRet = noti_ex_action_is_local(hAction, &bIsLocal);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_is_local", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
+ PRINT_RESULT_CLEANUP(true, bIsLocal, "noti_ex_action_is_local", "bIsLocal is not set true", noti_ex_action_destroy(hAction));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Executes the action for a notification_ex item.
+/**
+* @testcase ITc_noti_ex_action_execute_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Executes the action for a notification_ex item.
+* @scenario Creates the notification_ex action handle and Executes the action \n
+* for a notification_ex item. Check for Pass/Fail.
+* @apicovered noti_ex_action_execute
+* @passcase noti_ex_action_execute is successful and return correct value
+* @failcase noti_ex_action_execute failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_execute_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+
+ nRet = noti_ex_action_visibility_create(&hAction, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_action_destroy(hAction));
+
+ nRet = noti_ex_item_set_action(g_hItemButton, hAction);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_action", NotificationExGetError(nRet), noti_ex_action_destroy(hAction); noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_action_execute(hAction, g_hItemButton);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_execute", NotificationExGetError(nRet), noti_ex_action_destroy(hAction); noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the extra data for an action.
+/**
+* @testcase ITc_noti_ex_action_get_extra_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the extra data for an action.
+* @scenario Creates the notification_ex action handle and Gets the extra data\n
+* for an action. Check for Pass/Fail.
+* @apicovered noti_ex_action_get_extra
+* @passcase noti_ex_action_get_extra is successful and return correct value
+* @failcase noti_ex_action_get_extra failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_action_get_extra_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hAction = NULL;
+ const char* pszSetExtra = "test";
+ char* pszGetExtra = NULL;
+
+ nRet = noti_ex_action_visibility_create(&hAction, pszSetExtra);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hAction, "noti_ex_action_visibility_create");
+
+ //Target API
+ nRet = noti_ex_action_get_extra(hAction, &pszGetExtra);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_get_extra", NotificationExGetError(nRet), noti_ex_action_destroy(hAction));
+ CHECK_HANDLE_CLEANUP(pszGetExtra, "noti_ex_action_get_extra", noti_ex_action_destroy(hAction));
+
+ if (strncmp(pszSetExtra, pszGetExtra, sizeof(pszGetExtra)-1))
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_action_get_extra: return extra string is different from set extra [%s]\\n", __LINE__, API_NAMESPACE, pszGetExtra);
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ nRet = noti_ex_action_destroy(hAction);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with a button.
+/**
+* @testcase ITc_noti_ex_item_button_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with a button.
+* @scenario Creates the notification_ex item handle with a button \n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_button_create
+* @passcase noti_ex_item_button_create is successful and return correct value
+* @failcase noti_ex_item_button_create failed or return null value
+* @precondition NA.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_button_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ //Taregt API
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the title of a button item.
+/**
+* @testcase ITc_noti_ex_item_button_get_title_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the title of a button item.
+* @scenario Creates the notification_ex item handle with a button \n
+* Gets the title and compare with Set title. Check for Pass/Fail.
+* @apicovered noti_ex_item_button_get_title
+* @passcase noti_ex_item_button_get_title is successful and return correct value
+* @failcase noti_ex_item_button_get_title failed or return null value
+* @precondition NA.
+* @postcondition Free Title pointer memory and destroy handle.
+*/
+int ITc_noti_ex_item_button_get_title_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ char* pszGetTitle = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Taregt API
+ nRet = noti_ex_item_button_get_title(g_hItemButton, &pszGetTitle);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_get_title", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetTitle, "noti_ex_item_button_get_title", noti_ex_item_destroy(g_hItemButton));
+
+ if (strncmp(g_pszButtonTitle, pszGetTitle, sizeof(pszGetTitle)-1))
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_button_get_title: return title is different from set title [%s]\\n", __LINE__, API_NAMESPACE, pszGetTitle);
+ FREE_MEMORY(pszGetTitle);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetTitle);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle for the chat message.
+/**
+* @testcase ITc_noti_ex_item_chat_message_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle for the chat message.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Check for handle and check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_create
+* @passcase noti_ex_item_chat_message_create is successful and return correct value
+* @failcase noti_ex_item_chat_message_create failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Free Title pointer memory and destroy handle.
+*/
+int ITc_noti_ex_item_chat_message_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemChatMsg = NULL;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ noti_ex_item_chat_message_type_e eChatMsgType[] = {
+ NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_USER,
+ NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_SENDER
+ };
+
+ int nEnumSize = sizeof(eChatMsgType) / sizeof(eChatMsgType[0]);
+ int nEnumCounter;
+
+ for ( nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+ {
+ //Taregt API
+ nRet = noti_ex_item_chat_message_create(&hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, eChatMsgType[nEnumCounter]);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ nRet = noti_ex_item_destroy(hItemChatMsg);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ }
+
+
+ nRet = noti_ex_item_destroy(g_hItemName);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(g_hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(g_hItemImage);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(g_hItemTime);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the notification_ex item handle for the chat message name.
+/**
+* @testcase ITc_noti_ex_item_chat_message_get_name_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the notification_ex item handle for the chat message name.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Get Chat message name and compare with set message name \n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_get_name
+* @passcase noti_ex_item_chat_message_get_name is successful and return correct value
+* @failcase noti_ex_item_chat_message_get_name failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Free Chat Msg pointer memory and destroy handle.
+*/
+int ITc_noti_ex_item_chat_message_get_name_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGetName = NULL;
+ char *pszGetChatName = NULL;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_chat_message_create(&g_hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, g_eChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(g_hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ //Taregt API
+ nRet = noti_ex_item_chat_message_get_name(g_hItemChatMsg, &hItemGetName);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_get_name", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(hItemGetName, "noti_ex_item_chat_message_get_name", DestroyChatMsgAttributes());
+
+ nRet = noti_ex_item_text_get_contents(hItemGetName, &pszGetChatName);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(pszGetChatName, "noti_ex_item_text_get_contents", DestroyChatMsgAttributes());
+
+ if( strncmp(g_pszNameText, pszGetChatName, sizeof(pszGetChatName)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_name: return name is different from set name [%s]\\n", __LINE__, API_NAMESPACE, pszGetChatName);
+ FREE_MEMORY(pszGetChatName);
+ DestroyChatMsgAttributes();
+
+ return 1;
+ }
+ FREE_MEMORY(pszGetChatName);
+ DestroyChatMsgAttributes();
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the notification_ex item handle for the chat message text.
+/**
+* @testcase ITc_noti_ex_item_chat_message_get_text_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the notification_ex item handle for the chat message name.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Get Chat message name and compare with set message text \n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_get_text
+* @passcase noti_ex_item_chat_message_get_text is successful and return correct value
+* @failcase noti_ex_item_chat_message_get_text failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Free Title pointer memory and destroy handles.
+*/
+int ITc_noti_ex_item_chat_message_get_text_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGetText = NULL;
+ char *pszGetChatText = NULL;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_chat_message_create(&g_hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, g_eChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(g_hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ //Taregt API
+ nRet = noti_ex_item_chat_message_get_text(g_hItemChatMsg, &hItemGetText);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_get_text", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(hItemGetText, "noti_ex_item_chat_message_get_text", DestroyChatMsgAttributes());
+
+ nRet = noti_ex_item_text_get_contents(hItemGetText, &pszGetChatText);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(pszGetChatText, "noti_ex_item_text_get_contents", DestroyChatMsgAttributes());
+
+ if( strncmp(g_pszTextText, pszGetChatText, sizeof(pszGetChatText)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_text: return chat message text is different from set chat message text [%s]\\n", __LINE__, API_NAMESPACE, pszGetChatText);
+ FREE_MEMORY(pszGetChatText);
+ DestroyChatMsgAttributes();
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetChatText);
+ DestroyChatMsgAttributes();
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the notification_ex item handle for the chat message image.
+/**
+* @testcase ITc_noti_ex_item_chat_message_get_image_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the notification_ex item handle for the chat message image.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Get Chat message image path and compare with set message image path \n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_get_image
+* @passcase noti_ex_item_chat_message_get_image is successful and return correct value
+* @failcase noti_ex_item_chat_message_get_image failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Free Image Path pointer memory and destroy handles.
+*/
+int ITc_noti_ex_item_chat_message_get_image_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGetImage = NULL;
+ char *pszGetImagePath = NULL;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_chat_message_create(&g_hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, g_eChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(g_hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ //Taregt API
+ nRet = noti_ex_item_chat_message_get_image(g_hItemChatMsg, &hItemGetImage);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_get_image", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(hItemGetImage, "noti_ex_item_chat_message_get_image", DestroyChatMsgAttributes());
+
+ nRet = noti_ex_item_image_get_image_path(hItemGetImage, &pszGetImagePath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_get_image_path", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(pszGetImagePath, "noti_ex_item_image_get_image_path", DestroyChatMsgAttributes());
+
+ if( strncmp(g_pszImagePath, pszGetImagePath, sizeof(pszGetImagePath)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_chat_message_get_image: return image path is different from set image path [%s]\\n", __LINE__, API_NAMESPACE, pszGetImagePath);
+ FREE_MEMORY(pszGetImagePath);
+ DestroyChatMsgAttributes();
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetImagePath);
+ DestroyChatMsgAttributes();
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the notification_ex item handle for the chat message time.
+/**
+* @testcase ITc_noti_ex_item_chat_message_get_time_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the notification_ex item handle for the chat message time.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Get Chat message time and compare with set message time \n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_get_time
+* @passcase noti_ex_item_chat_message_get_time is successful and return correct value
+* @failcase noti_ex_item_chat_message_get_time failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Free Title pointer memory and destroy handle.
+*/
+int ITc_noti_ex_item_chat_message_get_time_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nDiffTime = -1;
+ noti_ex_item_h hItemGetTime = NULL;
+ time_t tGetCurrTime;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_chat_message_create(&g_hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, g_eChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(g_hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ //Taregt API
+ nRet = noti_ex_item_chat_message_get_time(g_hItemChatMsg, &hItemGetTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_get_time", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ CHECK_HANDLE_CLEANUP(hItemGetTime, "noti_ex_item_chat_message_get_time", DestroyChatMsgAttributes());
+
+ nRet = noti_ex_item_time_get_time(hItemGetTime, &tGetCurrTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_time_get_time", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+
+ nDiffTime = difftime(tGetCurrTime, g_tCurrTime);
+
+ if(nDiffTime)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_time_get_time: Get Time and Set Time is different and time difference is [%d]\\n", __LINE__, API_NAMESPACE, nDiffTime);
+ DestroyChatMsgAttributes();
+ return 1;
+ }
+ DestroyChatMsgAttributes();
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the type of chat message.
+/**
+* @testcase ITc_noti_ex_item_chat_message_get_message_type_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the type of chat message.
+* @scenario Creates the notification_ex item handle for the chat message \n
+* Gets the type of chat message and check for Pass/Fail.
+* @apicovered noti_ex_item_chat_message_get_message_type
+* @passcase noti_ex_item_chat_message_get_message_type is successful and return correct value
+* @failcase noti_ex_item_chat_message_get_message_type failed or return null value
+* @precondition Name, Text and Image must be created before creating chat message.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_chat_message_get_message_type_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_chat_message_type_e eGetChatMsgType;
+
+ nRet = CreateChatMsgAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API inside CreateChatMsgAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_chat_message_create(&g_hItemChatMsg, g_pszChatID, g_hItemName, g_hItemText, g_hItemImage, g_hItemTime, g_eChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_create", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+ CHECK_HANDLE_CLEANUP(g_hItemChatMsg, "noti_ex_item_chat_message_create", noti_ex_item_destroy(g_hItemName); noti_ex_item_destroy(g_hItemText); noti_ex_item_destroy(g_hItemImage); noti_ex_item_destroy(g_hItemTime));
+
+ //Taregt API
+ nRet = noti_ex_item_chat_message_get_message_type(g_hItemChatMsg, &eGetChatMsgType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_chat_message_get_message_type", NotificationExGetError(nRet), DestroyChatMsgAttributes());
+ PRINT_RESULT_CLEANUP(g_eChatMsgType, eGetChatMsgType, "noti_ex_item_chat_message_get_message_type", "Retrieved chat message type is not same", DestroyChatMsgAttributes());
+
+ DestroyChatMsgAttributes();
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with checkbox.
+/**
+* @testcase ITc_noti_ex_item_checkbox_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with checkbox.
+* @scenario Creates the notification_ex item handle for the checkbox \n
+* Check for handle and check for Pass/Fail.
+* @apicovered noti_ex_item_checkbox_create
+* @passcase noti_ex_item_checkbox_create is successful and return correct value
+* @failcase noti_ex_item_checkbox_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_checkbox_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemCheckBox = NULL;
+ const char *pszCheckBoxID = "checkbox_id";
+ const char *pszCheckBoxTitle = "checkbox_title";
+ bool bChecked = false;
+
+ nRet = noti_ex_item_checkbox_create(&hItemCheckBox, pszCheckBoxID, pszCheckBoxTitle, bChecked);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemCheckBox, "noti_ex_item_checkbox_create");
+
+ nRet = noti_ex_item_destroy(hItemCheckBox);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the title of a checkbox.
+/**
+* @testcase ITc_noti_ex_item_checkbox_get_title_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the title of a checkbox.
+* @scenario Creates the notification_ex item handle for the checkbox \n
+* Get checkbox title and compare with set title \n
+* and check for Pass/Fail.
+* @apicovered noti_ex_item_checkbox_get_title
+* @passcase noti_ex_item_checkbox_get_title is successful and return correct value
+* @failcase noti_ex_item_checkbox_get_title failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_checkbox_get_title_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemCheckBox = NULL;
+ const char *pszCheckBoxID = "checkbox_id";
+ const char *pszCheckBoxTitle = "checkbox_title";
+ bool bChecked = false;
+
+ char *pszGetCheckBoxTitle = NULL;
+
+ nRet = noti_ex_item_checkbox_create(&hItemCheckBox, pszCheckBoxID, pszCheckBoxTitle, bChecked);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemCheckBox, "noti_ex_item_checkbox_create");
+
+ //Target API
+ nRet = noti_ex_item_checkbox_get_title(hItemCheckBox, &pszGetCheckBoxTitle);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_get_title", NotificationExGetError(nRet), noti_ex_item_destroy(hItemCheckBox));
+ CHECK_HANDLE_CLEANUP(pszGetCheckBoxTitle, "noti_ex_item_checkbox_get_title", noti_ex_item_destroy(hItemCheckBox));
+
+ if( strncmp(pszGetCheckBoxTitle, pszCheckBoxTitle, sizeof(pszCheckBoxTitle)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_checkbox_get_title: return checkbox title is different from set checkbox title [%s]\\n", __LINE__, API_NAMESPACE, pszGetCheckBoxTitle);
+ FREE_MEMORY(pszGetCheckBoxTitle);
+ nRet = noti_ex_item_destroy(hItemCheckBox);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetCheckBoxTitle);
+
+ nRet = noti_ex_item_destroy(hItemCheckBox);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the check state of a checkbox.
+/**
+* @testcase ITc_noti_ex_item_checkbox_is_checked_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the check state of a checkbox.
+* @scenario Creates the notification_ex item handle for the checkbox \n
+* Gets the check state of a checkbox and compare with set title \n
+* and check for Pass/Fail.
+* @apicovered noti_ex_item_checkbox_is_checked
+* @passcase noti_ex_item_checkbox_is_checked is successful and return correct value
+* @failcase noti_ex_item_checkbox_is_checked failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_checkbox_is_checked_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemCheckBox = NULL;
+ const char *pszCheckBoxID = "checkbox_id";
+ const char *pszCheckBoxTitle = "checkbox_title";
+ bool bChecked = true;
+ bool bIsChecked = false;
+
+ nRet = noti_ex_item_checkbox_create(&hItemCheckBox, pszCheckBoxID, pszCheckBoxTitle, bChecked);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemCheckBox, "noti_ex_item_checkbox_create");
+
+ //Target API
+ nRet = noti_ex_item_checkbox_is_checked(hItemCheckBox, &bIsChecked);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_checkbox_is_checked", NotificationExGetError(nRet), noti_ex_item_destroy(hItemCheckBox));
+ PRINT_RESULT_CLEANUP(bChecked, bIsChecked, "noti_ex_item_checkbox_is_checked", "Checkbox checked API returned wrong value", noti_ex_item_destroy(hItemCheckBox));
+
+ nRet = noti_ex_item_destroy(hItemCheckBox);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle for an entry item.
+/**
+* @testcase ITc_noti_ex_item_entry_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle for an entry item.
+* @scenario Creates the notification_ex item handle for an entry item \n
+* Check handle and check for return value \n
+* and check for Pass/Fail.
+* @apicovered noti_ex_item_entry_create
+* @passcase noti_ex_item_entry_create is successful and return correct value
+* @failcase noti_ex_item_entry_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_entry_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemEntry = NULL;
+ const char *pszEntryID = "entry_id";
+
+ //Target API
+ nRet = noti_ex_item_entry_create(&hItemEntry, pszEntryID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_entry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemEntry, "noti_ex_item_entry_create");
+
+ nRet = noti_ex_item_destroy(hItemEntry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Set text to and get text from notification_ex item handle for an entry item.
+/**
+* @testcase ITc_noti_ex_item_entry_set_get_text_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Set text to and get text from notification_ex item handle for an entry item.
+* @scenario Set text and get text for entry item \n
+* Compare set and returned text and check for Pass/Fail.
+* @apicovered noti_ex_item_entry_set_text, noti_ex_item_entry_get_text
+* @passcase noti_ex_item_entry_set_text, noti_ex_item_entry_get_text are successful and return correct value
+* @failcase noti_ex_item_entry_set_text, noti_ex_item_entry_get_text failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_entry_set_get_text_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemEntry = NULL;
+ const char *pszEntryText = "entry_id";
+ char *pszEntryGetText = NULL;
+
+ nRet = noti_ex_item_entry_create(&hItemEntry, pszEntryText);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_entry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemEntry, "noti_ex_item_entry_create");
+
+ //Target API
+ nRet = noti_ex_item_entry_set_text(hItemEntry, pszEntryText);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_entry_set_text", NotificationExGetError(nRet), noti_ex_item_destroy(hItemEntry));
+
+ //Target API
+ nRet = noti_ex_item_entry_get_text(hItemEntry, &pszEntryGetText);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_entry_get_text", NotificationExGetError(nRet), noti_ex_item_destroy(hItemEntry));
+ CHECK_HANDLE_CLEANUP(pszEntryGetText, "noti_ex_item_entry_get_text", noti_ex_item_destroy(hItemEntry));
+
+ if( strncmp(pszEntryText, pszEntryGetText, sizeof(pszEntryGetText)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_entry_get_text: return entry text is different from set entry text [%s]\\n", __LINE__, API_NAMESPACE, pszEntryGetText);
+ FREE_MEMORY(pszEntryGetText);
+
+ nRet = noti_ex_item_destroy(hItemEntry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszEntryGetText);
+
+ nRet = noti_ex_item_destroy(hItemEntry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the group of notification_ex items and destroys it.
+/**
+* @testcase ITc_noti_ex_item_group_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle for an group item.
+* @scenario Create the group item and set ID and destroy \n
+* @apicovered noti_ex_item_group_create, noti_ex_item_destroy
+* @passcase noti_ex_item_group_create, noti_ex_item_destroy are successful and return correct value
+* @failcase noti_ex_item_group_create, noti_ex_item_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_group_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ const char *pszGroupID = "group_id";
+
+ //Target API
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets the direction of children in the group item and Gets the vertical state of group item.
+/**
+* @testcase ITc_noti_ex_item_group_set_direction_is_vertical_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets the direction of children in the group item and Gets the vertical state of group item
+* @scenario Set child direction and get vertical state \n
+* Compare set and returned state and check for Pass/Fail.
+* @apicovered noti_ex_item_group_set_direction, noti_ex_item_group_is_vertical
+* @passcase noti_ex_item_group_set_direction, noti_ex_item_group_is_vertical are successful and return correct value
+* @failcase noti_ex_item_group_set_direction, noti_ex_item_group_is_vertical failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_group_set_direction_is_vertical_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ const char *pszGroupID = "group_id";
+ bool bSetVertical = true;
+ bool bisVertical = false;
+
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ //Target API
+ nRet = noti_ex_item_group_set_direction(hItemGroup, bSetVertical);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_set_direction", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+
+ //Target API
+ nRet = noti_ex_item_group_is_vertical(hItemGroup, &bisVertical);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_is_vertical", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+ PRINT_RESULT_CLEANUP(bSetVertical, bisVertical, "noti_ex_item_group_is_vertical", "return state is not matching", noti_ex_item_destroy(hItemGroup));
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the label of application.
+/**
+* @testcase ITc_noti_ex_item_group_get_app_label_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the label of application.
+* @scenario Create group item and set label and check for Pass/Fail.
+* @apicovered noti_ex_item_group_get_app_label
+* @passcase noti_ex_item_group_get_app_label is successful and return correct value
+* @failcase noti_ex_item_group_get_app_label failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_group_get_app_label_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ const char *pszGroupID = "group_id";
+ char *pszGetAppLabel = NULL;
+
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ //Target API
+ nRet = noti_ex_item_group_get_app_label(hItemGroup, &pszGetAppLabel);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_get_app_label", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+ CHECK_HANDLE_CLEANUP(pszGetAppLabel, "noti_ex_item_group_get_app_label", noti_ex_item_destroy(hItemGroup));
+
+ FPRINTF("[Line : %d][%s] noti_ex_item_group_get_app_label: return app label is [%s]\\n", __LINE__, API_NAMESPACE, pszGetAppLabel);
+ FREE_MEMORY(pszGetAppLabel);
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Adds and remove the child to and from the group item.
+/**
+* @testcase ITc_noti_ex_item_group_add_remove_child_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Adds and remove the child to and from the group item.
+* @scenario Create group item, create child item\n
+* Add chile item and remove child item and check for Pass/Fail.
+* @apicovered noti_ex_item_group_add_child, noti_ex_item_group_remove_child
+* @passcase noti_ex_item_group_add_child, noti_ex_item_group_remove_child are successful and return correct value
+* @failcase noti_ex_item_group_add_child, noti_ex_item_group_remove_child failed or return null value
+* @precondition Create button and add child.
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_group_add_remove_child_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ const char *pszGroupID = "group_id";
+
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_item_destroy(hItemGroup));
+
+ //Target API
+ nRet = noti_ex_item_group_add_child(hItemGroup, g_hItemButton);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_add_child", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_group_remove_child(hItemGroup, g_pszButtonID);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_remove_child", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the data of children from the group item.
+/**
+* @testcase ITc_noti_ex_item_group_foreach_child_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the data of children from the group item.
+* @scenario Create group item, create child item\n
+* Register callback, check for callback hit and check for Pass/Fail.
+* @apicovered noti_ex_item_group_foreach_child
+* @passcase noti_ex_item_group_foreach_child is successful and return correct value
+* @failcase noti_ex_item_group_foreach_child failed or return null value
+* @precondition Create button, add button as child,
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_group_foreach_child_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ const char *pszGroupID = "group_id";
+
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_item_destroy(hItemGroup));
+
+ nRet = noti_ex_item_group_add_child(hItemGroup, g_hItemButton);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_add_child", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ g_CallBackHit = false;
+
+ //Target API
+ nRet = noti_ex_item_group_foreach_child(hItemGroup, NotiExItemGroupForeachChildCb, NULL);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_foreach_child", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] NotiExItemGroupForeachChildCb Callback not hit\\n", __LINE__, API_NAMESPACE);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with an image.
+/**
+* @testcase ITc_noti_ex_item_image_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with an image.
+* @scenario Create notification_ex item handle with an image\n
+* Check for handle and check for Pass/Fail.
+* @apicovered noti_ex_item_image_create
+* @passcase noti_ex_item_image_create is successful and return correct value
+* @failcase noti_ex_item_image_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_image_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemImage = NULL;
+ const char *pszImageID = "image_id";
+ const char *pszImagePath = "image_path";
+
+ //Target API
+ nRet = noti_ex_item_image_create(&hItemImage, pszImageID, pszImagePath);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemImage, "noti_ex_item_image_create");
+
+ nRet = noti_ex_item_destroy(hItemImage);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the path of image.
+/**
+* @testcase ITc_noti_ex_item_image_get_image_path_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the path of image.
+* @scenario Create notification_ex item handle with an image\n
+* Gets the path of image, and compare with set path and check for Pass/Fail.
+* @apicovered noti_ex_item_image_get_image_path
+* @passcase noti_ex_item_image_get_image_path is successful and return correct value
+* @failcase noti_ex_item_image_get_image_path failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_image_get_image_path_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemImage = NULL;
+ const char *pszImageID = "image_id";
+ const char *pszImagePath = "image_path";
+ char *pszGetImagePath = NULL;
+
+ nRet = noti_ex_item_image_create(&hItemImage, pszImageID, pszImagePath);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemImage, "noti_ex_item_image_create");
+
+ //Target API
+ nRet = noti_ex_item_image_get_image_path(hItemImage, &pszGetImagePath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_image_get_image_path", NotificationExGetError(nRet), noti_ex_item_destroy(hItemImage));
+ CHECK_HANDLE_CLEANUP(pszGetImagePath, "noti_ex_item_image_get_image_path", noti_ex_item_destroy(hItemImage));
+
+ if( strncmp(pszImagePath, pszGetImagePath, sizeof(pszGetImagePath)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_image_get_image_path: return image path is different from set image path [%s]\\n", __LINE__, API_NAMESPACE, pszGetImagePath);
+ FREE_MEMORY(pszGetImagePath);
+
+ nRet = noti_ex_item_destroy(hItemImage);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetImagePath);
+
+ nRet = noti_ex_item_destroy(hItemImage);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with input selector.
+/**
+* @testcase ITc_noti_ex_item_input_selector_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with input selector.
+* @scenario Creates the notification_ex item handle with input selector\n
+* Check for handle and check for Pass/Fail.
+* @apicovered noti_ex_item_input_selector_create
+* @passcase noti_ex_item_input_selector_create is successful and return correct value
+* @failcase noti_ex_item_input_selector_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_input_selector_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemInputSel = NULL;
+ const char *pszInputSelID = "input_selector_id";
+
+ //Target API
+ nRet = noti_ex_item_input_selector_create(&hItemInputSel, pszInputSelID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemInputSel, "noti_ex_item_input_selector_create");
+
+ nRet = noti_ex_item_destroy(hItemInputSel);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the contents for input selector item.
+/**
+* @testcase ITc_noti_ex_item_input_selector_set_get_contents_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the contents for input selector item.
+* @scenario Creates the notification_ex item handle with input selector\n
+* Set input selector item content and get content\n
+* Compare set and get contents and check for Pass/Fail.
+* @apicovered noti_ex_item_input_selector_set_contents, noti_ex_item_input_selector_get_contents
+* @passcase noti_ex_item_input_selector_set_contents, noti_ex_item_input_selector_get_contents are successful and return correct value
+* @failcase noti_ex_item_input_selector_set_contents, noti_ex_item_input_selector_get_contents failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_input_selector_set_get_contents_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemInputSel = NULL;
+
+ int nSetCount = 2;
+ int nGetCount = 0;
+
+ const char *pszSetContents[] = {"content_1", "content_2"};
+ char **pszGetContents = NULL;
+
+ const char *pszInputSelID = "input_selector_id";
+
+ nRet = noti_ex_item_input_selector_create(&hItemInputSel, pszInputSelID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemInputSel, "noti_ex_item_input_selector_create");
+
+ //Target API
+ nRet = noti_ex_item_input_selector_set_contents(hItemInputSel, pszSetContents, nSetCount);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_set_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemInputSel));
+
+ //Target API
+ nRet = noti_ex_item_input_selector_get_contents(hItemInputSel, &pszGetContents, &nGetCount);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_input_selector_get_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemInputSel); FREE_MEMORY(pszGetContents));
+ CHECK_HANDLE_CLEANUP(pszGetContents, "noti_ex_item_input_selector_get_contents", noti_ex_item_destroy(hItemInputSel));
+ PRINT_RESULT_CLEANUP(nSetCount, nGetCount, "noti_ex_item_input_selector_get_contents", "count revcieved is not same and set count", noti_ex_item_destroy(hItemInputSel); FREE_MEMORY(pszGetContents));
+
+ FREE_MEMORY(pszGetContents);
+
+ nRet = noti_ex_item_destroy(hItemInputSel);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Finds the notification_ex item handle by notification_ex item id.
+/**
+* @testcase ITc_noti_ex_item_find_by_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Finds the notification_ex item handle by notification_ex item id.
+* @scenario Creates the group of notification_ex items, create child item and add to group.\n
+* Find item by ID, compare IDs and check for Pass/Fail.
+* @apicovered noti_ex_item_find_by_id
+* @passcase noti_ex_item_find_by_id is successful and return correct value
+* @failcase noti_ex_item_find_by_id failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_find_by_id_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemGroup = NULL;
+ noti_ex_item_h hItemFind = NULL;
+
+ const char *pszGroupID = "group_id";
+
+ char *pszGetFindItemID = NULL;
+ char *pszGetButtonItemID = NULL;
+
+ nRet = noti_ex_item_group_create(&hItemGroup, pszGroupID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemGroup, "noti_ex_item_group_create");
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_item_destroy(hItemGroup));
+
+ nRet = noti_ex_item_group_add_child(hItemGroup, g_hItemButton);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_add_child", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_find_by_id(hItemGroup, g_pszButtonID, &hItemFind);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_find_by_id", NotificationExGetError(nRet), noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hItemFind, "noti_ex_item_find_by_id", noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_get_id(hItemFind, &pszGetFindItemID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_id", NotificationExGetError(nRet));
+ CHECK_HANDLE_CLEANUP(pszGetFindItemID, "noti_ex_item_get_id", noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_get_id(g_hItemButton, &pszGetButtonItemID);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton); FREE_MEMORY(pszGetFindItemID););
+ CHECK_HANDLE_CLEANUP(pszGetButtonItemID, "noti_ex_item_get_id", noti_ex_item_destroy(hItemGroup); noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszGetButtonItemID, pszGetFindItemID, sizeof(pszGetFindItemID)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_find_by_id: return item ID is different from set item ID [%s]\\n", __LINE__, API_NAMESPACE, pszGetFindItemID);
+ FREE_MEMORY(pszGetFindItemID);
+ FREE_MEMORY(pszGetButtonItemID);
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetFindItemID);
+ FREE_MEMORY(pszGetButtonItemID);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hItemGroup);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the type of notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_get_type_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the type of notification_ex item.
+* @scenario Creates the notification_ex item, get the item type.\n
+* Compare type with created item and check for Pass/Fail.
+* @apicovered noti_ex_item_get_type
+* @passcase noti_ex_item_get_type is successful and return correct value
+* @failcase noti_ex_item_get_type failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_get_type_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_item_type_e eItemType = NOTI_EX_ITEM_TYPE_BUTTON;
+ int nGetType;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_get_type(g_hItemButton, &nGetType);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_type", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(eItemType, nGetType, "noti_ex_item_get_type", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the path of shared files.
+/**
+* @testcase ITc_noti_ex_item_get_shared_paths_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the path of shared files.
+* @scenario Creates the notification_ex item, get the item type.\n
+* Gets the path of shared files and check for Pass/Fail.
+* @apicovered noti_ex_item_get_shared_paths
+* @passcase noti_ex_item_get_shared_paths is successful and return correct value
+* @failcase noti_ex_item_get_shared_paths failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_get_shared_paths_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nGetCount;
+ int nCount;
+ char **pszGetSharedPath = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_get_shared_paths(g_hItemButton, &pszGetSharedPath, &nGetCount);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_shared_paths", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetSharedPath, "noti_ex_item_get_shared_paths", noti_ex_item_destroy(g_hItemButton));
+
+ for(nCount = 1; nCount <= nGetCount; nCount++)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_shared_paths: [%d]th Shared path=[%s] \\n", __LINE__, API_NAMESPACE, nCount, pszGetSharedPath[nCount]);
+ }
+
+ FREE_MEMORY(pszGetSharedPath);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the id of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the id of a notification_ex item.
+* @scenario Creates the notification_ex item, set item id and get item id.\n
+* Compare ids and check for Pass/Fail.
+* @apicovered noti_ex_item_set_id, noti_ex_item_get_id
+* @passcase noti_ex_item_set_id, noti_ex_item_get_id are successful and return correct value
+* @failcase noti_ex_item_set_id, noti_ex_item_get_id failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_id_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ const char *pszSetItemID = "testID";
+ char *pszGetItemID = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_id(g_hItemButton, pszSetItemID);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_id(g_hItemButton, &pszGetItemID);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetItemID, "noti_ex_item_get_id", noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszSetItemID, pszGetItemID, sizeof(pszGetItemID)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_id: return item ID is different from set item ID [%s]\\n", __LINE__, API_NAMESPACE, pszGetItemID);
+ FREE_MEMORY(pszGetItemID);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetItemID);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the action of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_action_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the action of a notification_ex item.
+* @scenario Creates the notification_ex action, create button, set item action and get item action.\n
+* Check get action handle and check for Pass/Fail.
+* @apicovered noti_ex_item_set_action, noti_ex_item_get_action
+* @passcase noti_ex_item_set_action, noti_ex_item_get_action are successful and return correct value
+* @failcase noti_ex_item_set_action, noti_ex_item_get_action failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_action_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_action_h hSetAction = NULL;
+ noti_ex_action_h hGetAction = NULL;
+ const char *pszSetExtra = "test";
+
+ nRet = noti_ex_action_visibility_create(&hSetAction, pszSetExtra);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_action_visibility_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hSetAction, "noti_ex_action_visibility_create");
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_action_destroy(hSetAction));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_action_destroy(hSetAction));
+
+ //Target API
+ nRet = noti_ex_item_set_action(g_hItemButton, hSetAction);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_action", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton); noti_ex_action_destroy(hSetAction));
+
+ //Target API
+ nRet = noti_ex_item_get_action(g_hItemButton, &hGetAction);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_action", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton); noti_ex_action_destroy(hSetAction));
+ CHECK_HANDLE_CLEANUP(hGetAction, "noti_ex_item_get_action", noti_ex_item_destroy(g_hItemButton); noti_ex_action_destroy(hSetAction));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the style of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_style_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the action of a notification_ex item.
+* @scenario Creates the notification_ex style, set item style and get item style.\n
+* Get Padding from style and compare with set padding and check for Pass/Fail.
+* @apicovered noti_ex_item_set_style, noti_ex_item_get_style
+* @passcase noti_ex_item_set_style, noti_ex_item_get_style are successful and return correct value
+* @failcase noti_ex_item_set_style, noti_ex_item_get_style failed or return null value
+* @precondition NA
+* @postcondition Destroy handles.
+*/
+int ITc_noti_ex_item_set_get_style_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_style_h hGetStyle = NULL;
+ noti_ex_padding_h hGetPadding = NULL;
+ int nGetLeft, nGetTop, nGetRight, nGetBottom;
+
+ nRet = CreateStyleAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the prerequisite API inside CreateStyleAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+
+ }
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), DestroyStyleAttributes());
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", DestroyStyleAttributes());
+
+ //Target API
+ nRet = noti_ex_item_set_style(g_hItemButton, g_hStyle);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), DestroyStyleAttributes());
+
+ //Target API
+ nRet = noti_ex_item_get_style(g_hItemButton, &hGetStyle);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), DestroyStyleAttributes());
+ CHECK_HANDLE_CLEANUP(hGetStyle, "noti_ex_item_button_create", DestroyStyleAttributes());
+
+ nRet = noti_ex_style_get_padding(hGetStyle, &hGetPadding);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_left(hGetPadding, &nGetLeft);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_left", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nLeft, nGetLeft, "noti_ex_padding_get_left", "g_nLeft and nGetLeft are not same", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_top(hGetPadding, &nGetTop);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_top", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nTop, nGetTop, "noti_ex_padding_get_top", "g_nTop and nGetTop are not same", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_right(hGetPadding, &nGetRight);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_right", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nRight, nGetRight, "noti_ex_padding_get_right", "g_nRight and nGetRight are not same", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_bottom(hGetPadding, &nGetBottom);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_bottom", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nBottom, nGetBottom, "noti_ex_padding_get_bottom", "g_nBottom and nGetBottom are not same", DestroyStyleAttributes());
+
+ DestroyStyleAttributes();
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the visibility state of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_visible_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the visibility state of a notification_ex item.
+* @scenario Creates the notification_ex button, set item visibility and get item visibility.\n
+* compare the get visiblity wiht set visibility and check for Pass/Fail.
+* @apicovered noti_ex_item_set_visible, noti_ex_item_get_visible
+* @passcase noti_ex_item_set_visible, noti_ex_item_get_visible are successful and return correct value
+* @failcase noti_ex_item_set_visible, noti_ex_item_get_visible failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_visible_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ bool bSetVisible = true;
+ bool bIsVisible = false;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_visible(g_hItemButton, bSetVisible);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_visible", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_visible(g_hItemButton, &bIsVisible);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_visible", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(bSetVisible, bIsVisible, "noti_ex_item_get_visible", "get visible return state is not same as set visible state", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the enabled state of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_enable_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the enable state of a notification_ex item.
+* @scenario Creates the notification_ex button, set item enable state and get item enable state.\n
+* compare the get enable state with set enable state and check for Pass/Fail.
+* @apicovered noti_ex_item_set_enable, noti_ex_item_get_enable
+* @passcase noti_ex_item_set_enable, noti_ex_item_get_enable are successful and return correct value
+* @failcase noti_ex_item_set_enable, noti_ex_item_get_enable failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_enable_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ bool bSetEnable = true;
+ bool bIsEnable = false;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_enable(g_hItemButton, bSetEnable);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_enable", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_enable(g_hItemButton, &bIsEnable);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_enable", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(bSetEnable, bIsEnable, "noti_ex_item_get_enable", "get enable return state is not same as set enable state", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Adds and removes the receiver group of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_add_remove_receiver_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Adds and removes the receiver group of a notification_ex item.
+* @scenario Creates the notification_ex button, add reciever and remove reciever.\n
+* get reciever list and compate with set reciever count and check for Pass/Fail.
+* @apicovered noti_ex_item_add_receiver, noti_ex_item_remove_receiver
+* @passcase noti_ex_item_add_receiver, noti_ex_item_remove_receiver are successful and return correct value
+* @failcase noti_ex_item_add_receiver, noti_ex_item_remove_receiver failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_add_remove_receiver_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ char **pszGetList = NULL;
+ const char* pszRecvOne = "TestRecv1";
+ const char* pszRecvTwo = "TestRecv2";
+ int nGetRecvCnt;
+ int nSetRecvCnt = 2;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_add_receiver(g_hItemButton, pszRecvOne);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_add_receiver", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_add_receiver(g_hItemButton, pszRecvTwo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_add_receiver", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_get_receiver_list(g_hItemButton, &pszGetList, &nGetRecvCnt);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_receiver_list", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(nSetRecvCnt, nGetRecvCnt, "noti_ex_item_get_receiver_list", "returned different value of receiver", noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_remove_receiver(g_hItemButton, pszRecvOne);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_remove_receiver", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ nSetRecvCnt = 1;
+
+ nRet = noti_ex_item_get_receiver_list(g_hItemButton, &pszGetList, &nGetRecvCnt);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_receiver_list", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(nSetRecvCnt, nGetRecvCnt, "noti_ex_item_get_receiver_list", "noti_ex_item_remove_receiver does not work and returned diffrent value of reciever", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the list of receiver group of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_get_receiver_list_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the list of receiver group of a notification_ex item.
+* @scenario Creates the notification_ex button, add reciever and get the reciever list.\n
+* Compate with set reciever count and check for Pass/Fail.
+* @apicovered noti_ex_item_get_receiver_list
+* @passcase noti_ex_item_get_receiver_list is successful and return correct value
+* @failcase noti_ex_item_get_receiver_list failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_get_receiver_list_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ char **pszGetList = NULL;
+ const char* pszRecvOne = "TestRecv1";
+ const char* pszRecvTwo = "TestRecv2";
+ int nGetRecvCnt;
+ int nSetRecvCnt = 2;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ nRet = noti_ex_item_add_receiver(g_hItemButton, pszRecvOne);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_add_receiver", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_add_receiver(g_hItemButton, pszRecvTwo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_add_receiver", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_receiver_list(g_hItemButton, &pszGetList, &nGetRecvCnt);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_receiver_list", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(nSetRecvCnt, nGetRecvCnt, "noti_ex_item_get_receiver_list", "returned different value of receiver", noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetList, "noti_ex_item_get_receiver_list", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the policy of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_get_receiver_list_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the policy of a notification_ex item.
+* @scenario Creates the notification_ex button, Set different policies of type noti_ex_item_policy_e.\n
+* get policy and compare with set policy and check for Pass/Fail.
+* @apicovered noti_ex_item_set_policy, noti_ex_item_get_policy
+* @passcase noti_ex_item_set_policy, noti_ex_item_get_policy are successful and return correct value
+* @failcase noti_ex_item_set_policy, noti_ex_item_get_policy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_policy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nGetPolicy;
+
+ noti_ex_item_policy_e eSetPolicy[] =
+ {
+ NOTI_EX_ITEM_POLICY_NONE,
+ NOTI_EX_ITEM_POLICY_ON_BOOT_CLEAR,
+ NOTI_EX_ITEM_POLICY_SIM_MODE
+ };
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ int nEnumSize = sizeof(eSetPolicy) / sizeof(eSetPolicy[0]);
+ int nEnumCounter;
+
+ for(nEnumCounter=0; nEnumCounter<nEnumSize; nEnumCounter++)
+ {
+ //Target API
+ nRet = noti_ex_item_set_policy(g_hItemButton, eSetPolicy[nEnumCounter]);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_policy", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_policy(g_hItemButton, &nGetPolicy);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_policy", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(eSetPolicy[nEnumCounter], nGetPolicy, "noti_ex_item_get_policy", "returned different value of policy", noti_ex_item_destroy(g_hItemButton));
+ }
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the channel of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_channel_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the channel of a notification_ex item.
+* @scenario Creates the notification_ex button, Set channel\n
+* get channel and compare with set channel and check for Pass/Fail.
+* @apicovered noti_ex_item_set_channel, noti_ex_item_get_channel
+* @passcase noti_ex_item_set_channel, noti_ex_item_get_channel are successful and return correct value
+* @failcase noti_ex_item_set_channel, noti_ex_item_get_channel failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_channel_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ const char *pszSetChannel = "testID";
+ char *pszGetChannel = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_channel(g_hItemButton, pszSetChannel);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_channel", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_channel(g_hItemButton, &pszGetChannel);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_channel", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetChannel, "noti_ex_item_get_channel", noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszSetChannel, pszGetChannel, sizeof(pszGetChannel)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_channel: return Channel is different from set Channel [%s]\\n", __LINE__, API_NAMESPACE, pszGetChannel);
+ FREE_MEMORY(pszGetChannel);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetChannel);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the LED information of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_led_info_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the LED information of a notification_ex item.
+* @scenario Creates color, led info, button and set led info\n
+* get led info and check get led info handle and check for Pass/Fail.
+* @apicovered noti_ex_item_set_led_info, noti_ex_item_get_led_info
+* @passcase noti_ex_item_set_led_info, noti_ex_item_get_led_info are successful and return correct value
+* @failcase noti_ex_item_set_led_info, noti_ex_item_get_led_info failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_led_info_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_color_h hColor = NULL;
+ noti_ex_led_info_h hSetLedInfo = NULL;
+ noti_ex_led_info_h hGetLedInfo = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ nRet = noti_ex_led_info_create(&hSetLedInfo, hColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hSetLedInfo, "noti_ex_led_info_create", noti_ex_color_destroy(hColor));
+
+ nRet = CreateButton();
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hSetLedInfo));
+ CHECK_HANDLE_CLEANUP(g_hItemButton, "noti_ex_item_button_create", noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hSetLedInfo));
+
+ //Target API
+ nRet = noti_ex_item_set_led_info(g_hItemButton, hSetLedInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_led_info", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hSetLedInfo); noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_led_info(g_hItemButton, &hGetLedInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_led_info", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hSetLedInfo); noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hGetLedInfo, "noti_ex_item_get_led_info", noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hSetLedInfo); noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_led_info_destroy(hSetLedInfo);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the sound path of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_sound_path_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the sound path of a notification_ex item.
+* @scenario Creates notification_ex button and set sound path\n
+* get sound path and compare with set sound path and check for Pass/Fail.
+* @apicovered noti_ex_item_set_sound_path, noti_ex_item_get_sound_path
+* @passcase noti_ex_item_set_sound_path, noti_ex_item_get_sound_path are successful and return correct value
+* @failcase noti_ex_item_set_sound_path, noti_ex_item_get_sound_path failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_sound_path_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ const char *pszSetSoundPath = "testPath";
+ char *pszGetSoundPath = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_sound_path(g_hItemButton, pszSetSoundPath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_sound_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_sound_path(g_hItemButton, &pszGetSoundPath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_sound_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetSoundPath, "noti_ex_item_get_sound_path", noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszSetSoundPath, pszGetSoundPath, sizeof(pszGetSoundPath)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_sound_path: return Sound Path is different from set Sound Path [%s]\\n", __LINE__, API_NAMESPACE, pszGetSoundPath);
+ FREE_MEMORY(pszGetSoundPath);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetSoundPath);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the vibration path of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_vibration_path_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the vibration path of a notification_ex item.
+* @scenario Creates notification_ex button and set vibration path\n
+* get vibration path and compare with set vibration path and check for Pass/Fail.
+* @apicovered noti_ex_item_set_vibration_path, noti_ex_item_get_vibration_path
+* @passcase noti_ex_item_set_vibration_path, noti_ex_item_get_vibration_path are successful and return correct value
+* @failcase noti_ex_item_set_vibration_path, noti_ex_item_get_vibration_path failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_vibration_path_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ const char *pszSetVibPath = "testVibPath";
+ char *pszGetVibPath = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_vibration_path(g_hItemButton, pszSetVibPath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_vibration_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_vibration_path(g_hItemButton, &pszGetVibPath);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_vibration_path", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetVibPath, "noti_ex_item_get_vibration_path", noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszSetVibPath, pszGetVibPath, sizeof(pszGetVibPath)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_vibration_path: return vibration Path is different from set vibration Path [%s]\\n", __LINE__, API_NAMESPACE, pszGetVibPath);
+ FREE_MEMORY(pszGetVibPath);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetVibPath);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the information of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_get_info_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the information of a notification_ex item.
+* @scenario Creates notification_ex button and get item info handle\n
+* check item info handle and check for Pass/Fail.
+* @apicovered noti_ex_item_get_info
+* @passcase noti_ex_item_get_info is successful and return correct value
+* @failcase noti_ex_item_get_info failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_get_info_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_info_h hItemInfo = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_get_info(g_hItemButton, &hItemInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_info", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hItemInfo, "noti_ex_item_get_info", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the sender app id of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_get_sender_app_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the sender app id of a notification_ex item.
+* @scenario Creates notification_ex button and get sender app id\n
+* check sender app strin handle and check for Pass/Fail.
+* @apicovered noti_ex_item_get_sender_app_id
+* @passcase noti_ex_item_get_sender_app_id is successful and return correct value
+* @failcase noti_ex_item_get_sender_app_id failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_get_sender_app_id_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ char *pszSenderAppID = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_get_sender_app_id(g_hItemButton, &pszSenderAppID);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_sender_app_id", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszSenderAppID, "noti_ex_item_get_sender_app_id", noti_ex_item_destroy(g_hItemButton));
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_sender_app_id: Sender App ID [%s]\\n", __LINE__, API_NAMESPACE, pszSenderAppID);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the tag of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_set_get_tag_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the tag of a notification_ex item.
+* @scenario Creates notification_ex button and set buttons tag\n
+* get buttons tag and compare with set tag and check for Pass/Fail.
+* @apicovered noti_ex_item_set_tag, noti_ex_item_get_tag
+* @passcase noti_ex_item_set_tag, noti_ex_item_get_tag are successful and return correct value
+* @failcase noti_ex_item_set_tag, noti_ex_item_get_tag failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_set_get_tag_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ const char *pszSetTag = "testTag";
+ char *pszGetTag = NULL;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ //Target API
+ nRet = noti_ex_item_set_tag(g_hItemButton, pszSetTag);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_set_tag", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_get_tag(g_hItemButton, &pszGetTag);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_tag", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(pszGetTag, "noti_ex_item_get_tag", noti_ex_item_destroy(g_hItemButton));
+
+ if( strncmp(pszSetTag, pszGetTag, sizeof(pszGetTag)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_get_tag: return Tag is different from set Tag [%s]\\n", __LINE__, API_NAMESPACE, pszGetTag);
+ FREE_MEMORY(pszGetTag);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetTag);
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with progress.
+/**
+* @testcase ITc_noti_ex_item_progress_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with progress.
+* @scenario Creates notification_ex progress item and check handle\n
+* Check for Pass/Fail.
+* @apicovered noti_ex_item_progress_create
+* @passcase noti_ex_item_progress_create is successful and return correct value
+* @failcase noti_ex_item_progress_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_progress_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemProgress = NULL;
+
+ const char *pszProgressID = "progressID";
+ float fMin = 0.0;
+ float fCurrent = 0.0;
+ float fMax = 100.0;
+
+ //Target API
+ nRet = noti_ex_item_progress_create(&hItemProgress, pszProgressID, fMin, fCurrent, fMax);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemProgress, "noti_ex_item_progress_create");
+
+ nRet = noti_ex_item_destroy(hItemProgress);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the current value of progress.
+/**
+* @testcase ITc_noti_ex_item_progress_set_get_current_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the current value of progress.
+* @scenario Creates notification_ex progress item and Set current progress\n
+* Get current progress, compare them and Check for Pass/Fail.
+* @apicovered noti_ex_item_progress_set_current, noti_ex_item_progress_get_current
+* @passcase noti_ex_item_progress_set_current, noti_ex_item_progress_get_current are successful and return correct value
+* @failcase noti_ex_item_progress_set_current, noti_ex_item_progress_get_current failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_progress_set_get_current_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemProgress = NULL;
+
+ const char *pszProgressID = "progressID";
+ float fMin = 0.0;
+ float fCurrent = 0.0;
+ float fMax = 100.0;
+ float fSetCurrent = 50.0;
+ float fGetCurrent = 0.0;
+
+ nRet = noti_ex_item_progress_create(&hItemProgress, pszProgressID, fMin, fCurrent, fMax);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemProgress, "noti_ex_item_progress_create");
+
+ //Target API
+ nRet = noti_ex_item_progress_set_current(hItemProgress, fSetCurrent);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_set_current", NotificationExGetError(nRet), noti_ex_item_destroy(hItemProgress));
+
+ //Target API
+ nRet = noti_ex_item_progress_get_current(hItemProgress, &fGetCurrent);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_get_current", NotificationExGetError(nRet), noti_ex_item_destroy(hItemProgress));
+ if(fSetCurrent != fGetCurrent)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_progress_get_current: return time is different from set_current\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_item_destroy(hItemProgress);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the minimum and maximum value of progress.
+/**
+* @testcase ITc_noti_ex_item_progress_get_min_max_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the minimum and maximum value of progress.
+* @scenario Creates notification_ex progress item and with all progress value\n
+* Get minimum and maximum progress, compare them with set value and Check for Pass/Fail.
+* @apicovered noti_ex_item_progress_get_min, noti_ex_item_progress_get_max
+* @passcase noti_ex_item_progress_get_min, noti_ex_item_progress_get_max are successful and return correct value
+* @failcase noti_ex_item_progress_get_min, noti_ex_item_progress_get_max failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_progress_get_min_max_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemProgress = NULL;
+
+ const char *pszProgressID = "progressID";
+ float fMin = 0.0;
+ float fCurrent = 0.0;
+ float fMax = 100.0;
+ float fGetMin = 100.0;
+ float fGetMax = 0.0;
+
+ nRet = noti_ex_item_progress_create(&hItemProgress, pszProgressID, fMin, fCurrent, fMax);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemProgress, "noti_ex_item_progress_create");
+
+ //Target API
+ nRet = noti_ex_item_progress_get_min(hItemProgress, &fGetMin);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_get_min", NotificationExGetError(nRet), noti_ex_item_destroy(hItemProgress));
+ if(fGetMin != fMin)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_progress_get_min: return fGetMin is different from fMin \\n", __LINE__, API_NAMESPACE);
+ nRet = noti_ex_item_destroy(hItemProgress);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ return 1;
+ }
+
+ //Target API
+ nRet = noti_ex_item_progress_get_max(hItemProgress, &fGetMax);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_progress_get_max", NotificationExGetError(nRet), noti_ex_item_destroy(hItemProgress));
+ if(fGetMax != fMax)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_progress_get_max: return fGetMax is different from fMax\\n", __LINE__, API_NAMESPACE);
+ nRet = noti_ex_item_destroy(hItemProgress);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ return 1;
+ }
+
+ nRet = noti_ex_item_destroy(hItemProgress);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with text.
+/**
+* @testcase ITc_noti_ex_item_text_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with text.
+* @scenario Creates notification_ex text item, check for handle and check for Pass/Fail.
+* @apicovered noti_ex_item_text_create
+* @passcase noti_ex_item_text_create is successful and return correct value
+* @failcase noti_ex_item_text_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_text_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemText = NULL;
+
+ const char *pszTextID = "text_id";
+ const char *pszTextTitle = "textTitle";
+ const char *pszTextHyperLink = "testHyperLink";
+
+ //Target API
+ nRet = noti_ex_item_text_create(&hItemText, pszTextID, pszTextTitle, pszTextHyperLink);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemText, "noti_ex_item_text_create");
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the text contents of the text item.
+/**
+* @testcase ITc_noti_ex_item_text_set_get_contents_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the text contents of the text item.
+* @scenario Creates notification_ex text item and with ID, Title and hyperlink\n
+* Set Content and Get content, compare get value with set value and Check for Pass/Fail.
+* @apicovered noti_ex_item_text_set_contents, noti_ex_item_text_get_contents
+* @passcase noti_ex_item_text_set_contents, noti_ex_item_text_get_contents are successful and return correct value
+* @failcase noti_ex_item_text_set_contents, noti_ex_item_text_get_contents failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_text_set_get_contents_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemText = NULL;
+
+ const char *pszTextID = "text_id";
+ const char *pszTextTitle = "textTitle";
+ const char *pszTextHyperLink = "testHyperLink";
+
+ const char *pszSetContents = "testContent";
+ char *pszGetContents = NULL;
+
+ nRet = noti_ex_item_text_create(&hItemText, pszTextID, pszTextTitle, pszTextHyperLink);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemText, "noti_ex_item_text_create");
+
+ //Target API
+ nRet = noti_ex_item_text_set_contents(hItemText, pszSetContents);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_set_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemText));
+
+ //Target API
+ nRet = noti_ex_item_text_get_contents(hItemText, &pszGetContents);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_contents", NotificationExGetError(nRet), noti_ex_item_destroy(hItemText));
+ CHECK_HANDLE_CLEANUP(pszGetContents, "noti_ex_item_text_get_contents", noti_ex_item_destroy(hItemText));
+
+ if( strncmp(pszSetContents, pszGetContents, sizeof(pszGetContents)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_text_get_contents: return content is different from set content [%s]\\n", __LINE__, API_NAMESPACE, pszGetContents);
+ FREE_MEMORY(pszGetContents);
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetContents);
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the hyperlink of the text item.
+/**
+* @testcase ITc_noti_ex_item_text_get_hyperlink_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the hyperlink of the text item.
+* @scenario Creates notification_ex text item and with ID, Title and hyperlink\n
+* Get hyperlink and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_item_text_get_hyperlink
+* @passcase noti_ex_item_text_get_hyperlink is successful and return correct value
+* @failcase noti_ex_item_text_get_hyperlink failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_text_get_hyperlink_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemText = NULL;
+
+ const char *pszTextID = "text_id";
+ const char *pszTextTitle = "textTitle";
+ const char *pszTextHyperLink = "testHyperLink";
+
+ char *pszGetHyperLink = NULL;
+
+ nRet = noti_ex_item_text_create(&hItemText, pszTextID, pszTextTitle, pszTextHyperLink);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemText, "noti_ex_item_text_create");
+
+ //Target API
+ nRet = noti_ex_item_text_get_hyperlink(hItemText, &pszGetHyperLink);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_text_get_hyperlink", NotificationExGetError(nRet), noti_ex_item_destroy(hItemText));
+ CHECK_HANDLE_CLEANUP(pszGetHyperLink, "noti_ex_item_text_get_hyperlink", noti_ex_item_destroy(hItemText));
+
+ if( strncmp(pszTextHyperLink, pszGetHyperLink, sizeof(pszGetHyperLink)-1) )
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_text_get_hyperlink: return hyperlink is different from set hyperlink [%s]\\n", __LINE__, API_NAMESPACE, pszGetHyperLink);
+ FREE_MEMORY(pszGetHyperLink);
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ FREE_MEMORY(pszGetHyperLink);
+
+ nRet = noti_ex_item_destroy(hItemText);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with time.
+/**
+* @testcase ITc_noti_ex_item_time_create_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with time.
+* @scenario Creates notification_ex time item \n
+* Check for handle and Check for Pass/Fail.
+* @apicovered noti_ex_item_time_create
+* @passcase noti_ex_item_time_create is successful and return correct value
+* @failcase noti_ex_item_time_create failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_time_create_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemTime = NULL;
+ const char *pszTimeID = "time_id";
+ time_t tCurTime;
+
+ time(&tCurTime);
+
+ //Target API
+ nRet = noti_ex_item_time_create(&hItemTime, pszTimeID, tCurTime);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_time_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemTime, "noti_ex_item_time_create");
+
+ nRet = noti_ex_item_destroy(hItemTime);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex item handle with time.
+/**
+* @testcase ITc_noti_ex_item_time_get_time_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex item handle with time.
+* @scenario Creates notification_ex time item \n
+* get time and should bot be zero and Check for Pass/Fail.
+* @apicovered noti_ex_item_time_get_time
+* @passcase noti_ex_item_time_get_time is successful and return correct value
+* @failcase noti_ex_item_time_get_time failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_time_get_time_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_h hItemTime = NULL;
+ const char *pszTimeID = "time_id";
+ time_t tCurTime;
+ time_t tGetCurTime = 0;
+
+ time(&tCurTime);
+
+ nRet = noti_ex_item_time_create(&hItemTime, pszTimeID, tCurTime);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_time_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hItemTime, "noti_ex_item_time_create");
+
+ //Target API
+ nRet = noti_ex_item_time_get_time(hItemTime, &tGetCurTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_time_get_time", NotificationExGetError(nRet), noti_ex_item_destroy(hItemTime));
+
+ if(tGetCurTime == 0)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_item_time_get_time: return time [%ld]\\n", __LINE__, API_NAMESPACE, tGetCurTime);
+
+ nRet = noti_ex_item_destroy(hItemTime);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 1;
+ }
+
+ nRet = noti_ex_item_destroy(hItemTime);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and destroy the notification_ex color handle.
+/**
+* @testcase ITc_noti_ex_color_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and destroy the notification_ex color handle.
+* @scenario Creates notification_ex color item \n
+* Check handle and Check for Pass/Fail.
+* @apicovered noti_ex_color_create, noti_ex_color_destroy
+* @passcase noti_ex_color_create, noti_ex_color_destroy are successful and return correct value
+* @failcase noti_ex_color_create, noti_ex_color_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_color_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ //Target API
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the alpha value of a color.
+/**
+* @testcase ITc_noti_ex_color_get_alpha_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the alpha value of a color.
+* @scenario Creates notification_ex color item \n
+* Get alpha value and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_color_get_alpha
+* @passcase noti_ex_color_get_alpha is successful and return correct value
+* @failcase noti_ex_color_get_alpha failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_color_get_alpha_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+ unsigned char cGetAlpha;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_color_get_alpha(hColor, &cGetAlpha);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_alpha", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cAlpha, cGetAlpha, "noti_ex_color_get_alpha", "Set and Get alpha value is not same", noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the red value of a color.
+/**
+* @testcase ITc_noti_ex_color_get_red_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the red value of a color.
+* @scenario Creates notification_ex color item \n
+* Get red value and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_color_get_red
+* @passcase noti_ex_color_get_red is successful and return correct value
+* @failcase noti_ex_color_get_red failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_color_get_red_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+ unsigned char cGetRed;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_color_get_red(hColor, &cGetRed);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_red", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cRed, cGetRed, "noti_ex_color_get_red", "Set and Get red color value is not same", noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the green value of a color.
+/**
+* @testcase ITc_noti_ex_color_get_green_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the green value of a color.
+* @scenario Creates notification_ex color item \n
+* Get green value and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_color_get_green
+* @passcase noti_ex_color_get_green is successful and return correct value
+* @failcase noti_ex_color_get_green failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_color_get_green_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+ unsigned char cGetGreen;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_color_get_green(hColor, &cGetGreen);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_green", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cGreen, cGetGreen, "noti_ex_color_get_green", "Set and Get green color value is not same", noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the blue value of a color.
+/**
+* @testcase ITc_noti_ex_color_get_blue_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the blue value of a color.
+* @scenario Creates notification_ex color item \n
+* Get blue value and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_color_get_blue
+* @passcase noti_ex_color_get_blue is successful and return correct value
+* @failcase noti_ex_color_get_blue failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_color_get_blue_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+ unsigned char cGetBlue;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_color_get_blue(hColor, &cGetBlue);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_blue", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cBlue, cGetBlue, "noti_ex_color_get_blue", "Set and Get blue color value is not same", noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and destroy the notification_ex padding handle.
+/**
+* @testcase ITc_noti_ex_padding_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and destroy the notification_ex padding handle.
+* @scenario Creates notification_ex padding item \n
+* check handle and Check for Pass/Fail.
+* @apicovered noti_ex_padding_create, noti_ex_padding_destroy
+* @passcase noti_ex_padding_create, noti_ex_padding_destroy are successful and return correct value
+* @failcase noti_ex_padding_create, noti_ex_padding_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_padding_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hPadding = NULL;
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+
+ //Target API
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hPadding, "noti_ex_padding_create");
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the left value of padding.
+/**
+* @testcase ITc_noti_ex_padding_get_left_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the left value of padding.
+* @scenario Creates notification_ex padding item \n
+* get left padding and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_padding_get_left
+* @passcase noti_ex_padding_get_left is successful and return correct value
+* @failcase noti_ex_padding_get_left failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_padding_get_left_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hPadding = NULL;
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+ int nGetLeft;
+
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hPadding, "noti_ex_padding_create");
+
+ //Target API
+ nRet = noti_ex_padding_get_left(hPadding, &nGetLeft);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_left", NotificationExGetError(nRet), noti_ex_padding_destroy(hPadding));
+ PRINT_RESULT_CLEANUP(nLeft, nGetLeft, "noti_ex_padding_get_left", "Set and Get left padding value is not same", noti_ex_padding_destroy(hPadding));
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the top value of padding.
+/**
+* @testcase ITc_noti_ex_padding_get_top_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the top value of padding.
+* @scenario Creates notification_ex padding item \n
+* get top padding and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_padding_get_top
+* @passcase noti_ex_padding_get_top is successful and return correct value
+* @failcase noti_ex_padding_get_top failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_padding_get_top_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hPadding = NULL;
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+ int nGetTop;
+
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hPadding, "noti_ex_padding_create");
+
+ //Target API
+ nRet = noti_ex_padding_get_top(hPadding, &nGetTop);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_top", NotificationExGetError(nRet), noti_ex_padding_destroy(hPadding));
+ PRINT_RESULT_CLEANUP(nTop, nGetTop, "noti_ex_padding_get_top", "Set and Get top padding value is not same", noti_ex_padding_destroy(hPadding));
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the right value of padding.
+/**
+* @testcase ITc_noti_ex_padding_get_right_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the right value of padding.
+* @scenario Creates notification_ex padding item \n
+* get right padding and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_padding_get_right
+* @passcase noti_ex_padding_get_right is successful and return correct value
+* @failcase noti_ex_padding_get_right failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_padding_get_right_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hPadding = NULL;
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+ int nGetRight;
+
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hPadding, "noti_ex_padding_create");
+
+ //Target API
+ nRet = noti_ex_padding_get_right(hPadding, &nGetRight);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_right", NotificationExGetError(nRet), noti_ex_padding_destroy(hPadding));
+ PRINT_RESULT_CLEANUP(nRight, nGetRight, "noti_ex_padding_get_right", "Set and Get right padding value is not same", noti_ex_padding_destroy(hPadding));
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the bottom value of padding.
+/**
+* @testcase ITc_noti_ex_padding_get_bottom_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the bottom value of padding.
+* @scenario Creates notification_ex padding item \n
+* get bottom padding and compare with set value and Check for Pass/Fail.
+* @apicovered noti_ex_padding_get_bottom
+* @passcase noti_ex_padding_get_bottom is successful and return correct value
+* @failcase noti_ex_padding_get_bottom failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_padding_get_bottom_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hPadding = NULL;
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+ int nGetBottom;
+
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hPadding, "noti_ex_padding_create");
+
+ //Target API
+ nRet = noti_ex_padding_get_bottom(hPadding, &nGetBottom);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_bottom", NotificationExGetError(nRet), noti_ex_padding_destroy(hPadding));
+ PRINT_RESULT_CLEANUP(nBottom, nGetBottom, "noti_ex_padding_get_bottom", "Set and Get bottom padding value is not same", noti_ex_padding_destroy(hPadding));
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates the notification_ex geometry handle.
+/**
+* @testcase ITc_noti_ex_geometry_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates the notification_ex geometry handle.
+* @scenario Creates notification_ex geometry item \n
+* check handle and Check for Pass/Fail.
+* @apicovered noti_ex_geometry_create, noti_ex_geometry_destroy
+* @passcase noti_ex_geometry_create, noti_ex_geometry_destroy are successful and return correct value
+* @failcase noti_ex_geometry_create, noti_ex_geometry_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_geometry_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGeometry = NULL;
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ //Target API
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hGeometry, "noti_ex_geometry_create");
+
+ //Target API
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the x position value.
+/**
+* @testcase ITc_noti_ex_geometry_get_x_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the x position value.
+* @scenario Creates notification_ex geometry item \n
+* get x position and compare with set x position and Check for Pass/Fail.
+* @apicovered noti_ex_geometry_get_x
+* @passcase noti_ex_geometry_get_x is successful and return correct value
+* @failcase noti_ex_geometry_get_x failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_geometry_get_x_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGeometry = NULL;
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ int nGetX;
+
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hGeometry, "noti_ex_geometry_create");
+
+ //Target API
+ nRet = noti_ex_geometry_get_x(hGeometry, &nGetX);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_x", NotificationExGetError(nRet), noti_ex_geometry_destroy(hGeometry));
+ PRINT_RESULT_CLEANUP(nGetX, nX, "noti_ex_geometry_get_x", "Set X position is not same as get X", noti_ex_geometry_destroy(hGeometry));
+
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the y position value.
+/**
+* @testcase ITc_noti_ex_geometry_get_y_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the y position value.
+* @scenario Creates notification_ex geometry item \n
+* get y position and compare with set y position and Check for Pass/Fail.
+* @apicovered noti_ex_geometry_get_y
+* @passcase noti_ex_geometry_get_y is successful and return correct value
+* @failcase noti_ex_geometry_get_y failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_geometry_get_y_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGeometry = NULL;
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ int nGetY;
+
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hGeometry, "noti_ex_geometry_create");
+
+ //Target API
+ nRet = noti_ex_geometry_get_y(hGeometry, &nGetY);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_y", NotificationExGetError(nRet), noti_ex_geometry_destroy(hGeometry));
+ PRINT_RESULT_CLEANUP(nGetY, nY, "noti_ex_geometry_get_y", "Set Y position is not same as get Y", noti_ex_geometry_destroy(hGeometry));
+
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the width value.
+/**
+* @testcase ITc_noti_ex_geometry_get_width_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the width value.
+* @scenario Creates notification_ex geometry item \n
+* get width value and compare with set width value and Check for Pass/Fail.
+* @apicovered noti_ex_geometry_get_width
+* @passcase noti_ex_geometry_get_width is successful and return correct value
+* @failcase noti_ex_geometry_get_width failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_geometry_get_width_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGeometry = NULL;
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ int nGetW;
+
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hGeometry, "noti_ex_geometry_create");
+
+ //Target API
+ nRet = noti_ex_geometry_get_width(hGeometry, &nGetW);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_width", NotificationExGetError(nRet), noti_ex_geometry_destroy(hGeometry));
+ PRINT_RESULT_CLEANUP(nGetW, nW, "noti_ex_geometry_get_width", "Set Width position is not same as get Width", noti_ex_geometry_destroy(hGeometry));
+
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the height value.
+/**
+* @testcase ITc_noti_ex_geometry_get_height_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the height value.
+* @scenario Creates notification_ex geometry item \n
+* get height value and compare with set height value and Check for Pass/Fail.
+* @apicovered noti_ex_geometry_get_height
+* @passcase noti_ex_geometry_get_height is successful and return correct value
+* @failcase noti_ex_geometry_get_height failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_geometry_get_height_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGeometry = NULL;
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ int nGetH;
+
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hGeometry, "noti_ex_geometry_create");
+
+ //Target API
+ nRet = noti_ex_geometry_get_height(hGeometry, &nGetH);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_height", NotificationExGetError(nRet), noti_ex_geometry_destroy(hGeometry));
+ PRINT_RESULT_CLEANUP(nGetH, nH, "noti_ex_geometry_get_height", "Set height position is not same as get height", noti_ex_geometry_destroy(hGeometry));
+
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and destroys the notification_ex style handle.
+/**
+* @testcase ITc_noti_ex_style_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and destroys the notification_ex style handle.
+* @scenario Creates notification_ex color, padding, geometry and then create style item \n
+* Check handle and Check for Pass/Fail.
+* @apicovered noti_ex_style_create, noti_ex_style_destroy
+* @passcase noti_ex_style_create, noti_ex_style_destroy are successful and return correct value
+* @failcase noti_ex_style_create, noti_ex_style_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_style_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_style_h hStyle = NULL;
+ noti_ex_color_h hColor = NULL;
+ noti_ex_padding_h hPadding = NULL;
+ noti_ex_geometry_h hGeometry = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ int nLeft = 1;
+ int nTop = 2;
+ int nRight = 3;
+ int nBottom = 4;
+
+ int nX = 1;
+ int nY = 2;
+ int nW = 3;
+ int nH = 4;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ nRet = noti_ex_padding_create(&hPadding, nLeft, nTop, nRight, nBottom);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hPadding, "noti_ex_padding_create", noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_geometry_create(&hGeometry, nX, nY, nW, nH);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_padding_destroy(hPadding));
+ CHECK_HANDLE_CLEANUP(hGeometry, "noti_ex_geometry_create", noti_ex_color_destroy(hColor); noti_ex_padding_destroy(hPadding));
+
+ //Target API
+ nRet = noti_ex_style_create(&hStyle, hColor, hPadding, hGeometry);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_padding_destroy(hPadding); noti_ex_geometry_destroy(hGeometry));
+ CHECK_HANDLE_CLEANUP(hStyle, "noti_ex_style_create", noti_ex_color_destroy(hColor); noti_ex_padding_destroy(hPadding); noti_ex_geometry_destroy(hGeometry));
+
+ //Target API
+ nRet = noti_ex_style_destroy(hStyle);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_destroy", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_padding_destroy(hPadding); noti_ex_geometry_destroy(hGeometry));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_padding_destroy(hPadding);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_geometry_destroy(hGeometry);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the padding information from a style.
+/**
+* @testcase ITc_noti_ex_style_get_padding_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the padding information from a style.
+* @scenario Creates notification_ex color, padding, geometry and then create style item \n
+* Get padding from style, compare with set padding attributes and Check for Pass/Fail.
+* @apicovered noti_ex_style_get_padding
+* @passcase noti_ex_style_get_padding is successful and return correct value
+* @failcase noti_ex_style_get_padding failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_style_get_padding_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_padding_h hGetPadding;
+ int nGetStyleLeft, nGetStyleTop, nGetStyleRight, nGetStyleBottom;
+
+ nRet = CreateStyleAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the prerequisite API inside CreateStyleAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+
+ }
+ //Target API
+ nRet = noti_ex_style_get_padding(g_hStyle, &hGetPadding);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_get_padding", NotificationExGetError(nRet), DestroyStyleAttributes());
+ CHECK_HANDLE_CLEANUP(hGetPadding, "noti_ex_style_get_padding", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_left(hGetPadding, &nGetStyleLeft);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_left", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nLeft, nGetStyleLeft, "noti_ex_style_get_padding", "noti_ex_style_get_padding returned different left value", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_top(hGetPadding, &nGetStyleTop);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_top", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nTop, nGetStyleTop, "noti_ex_style_get_padding", "noti_ex_style_get_padding returned different top value", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_right(hGetPadding, &nGetStyleRight);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_right", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nRight, nGetStyleRight, "noti_ex_style_get_padding", "noti_ex_style_get_padding returned different right value", DestroyStyleAttributes());
+
+ nRet = noti_ex_padding_get_bottom(hGetPadding, &nGetStyleBottom);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_padding_get_bottom", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nBottom, nGetStyleBottom, "noti_ex_style_get_padding", "noti_ex_style_get_padding returned different bottom value", DestroyStyleAttributes());
+
+ DestroyStyleAttributes();
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the color information from a style.
+/**
+* @testcase ITc_noti_ex_style_get_color_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the color information from a style.
+* @scenario Creates notification_ex color, padding, geometry and then create style item \n
+* Get color from style, compare with set color attributes and Check for Pass/Fail.
+* @apicovered noti_ex_style_get_color
+* @passcase noti_ex_style_get_color is successful and return correct value
+* @failcase noti_ex_style_get_color failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_style_get_color_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hGetColor;
+ unsigned char cGetStyleAplha, cGetStyleRed, cGetStyleGreen, cGetStyleBlue;
+
+ nRet = CreateStyleAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the prerequisite API inside CreateStyleAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+
+ }
+
+ //Target API
+ nRet = noti_ex_style_get_color(g_hStyle, &hGetColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_get_color", NotificationExGetError(nRet), DestroyStyleAttributes());
+ CHECK_HANDLE_CLEANUP(hGetColor, "noti_ex_style_get_color", DestroyStyleAttributes());
+
+ nRet = noti_ex_color_get_alpha(hGetColor, &cGetStyleAplha);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_alpha", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_cAlpha, cGetStyleAplha, "noti_ex_style_get_color", "noti_ex_style_get_color returned different alpha value", DestroyStyleAttributes());
+
+ nRet = noti_ex_color_get_red(hGetColor, &cGetStyleRed);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_red", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_cRed, cGetStyleRed, "noti_ex_style_get_color", "noti_ex_style_get_color returned different red value", DestroyStyleAttributes());
+
+ nRet = noti_ex_color_get_green(hGetColor, &cGetStyleGreen);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_green", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_cGreen, cGetStyleGreen, "noti_ex_style_get_color", "noti_ex_style_get_color returned different green value", DestroyStyleAttributes());
+
+ nRet = noti_ex_color_get_blue(hGetColor, &cGetStyleBlue);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_blue", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_cBlue, cGetStyleBlue, "noti_ex_style_get_color", "noti_ex_style_get_color returned different blue value", DestroyStyleAttributes());
+
+ DestroyStyleAttributes();
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the geometry information from a style.
+/**
+* @testcase ITc_noti_ex_style_get_geometry_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the color information from a style.
+* @scenario Creates notification_ex color, padding, geometry and then create style item \n
+* Get geometry from style, compare with set geometry attributes and Check for Pass/Fail.
+* @apicovered noti_ex_style_get_geometry
+* @passcase noti_ex_style_get_geometry is successful and return correct value
+* @failcase noti_ex_style_get_geometry failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_style_get_geometry_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_geometry_h hGetGeometry;
+ int nGetStyleX, nGetStyleY, nGetStyleW, nGetStyleH;
+
+ nRet = CreateStyleAttributes();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the prerequisite API inside CreateStyleAttributes() is failed \\n", __LINE__, API_NAMESPACE);
+ return 1;
+
+ }
+ //Target API
+ nRet = noti_ex_style_get_geometry(g_hStyle, &hGetGeometry);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_style_get_geometry", NotificationExGetError(nRet), DestroyStyleAttributes());
+ CHECK_HANDLE_CLEANUP(hGetGeometry, "noti_ex_style_get_geometry", DestroyStyleAttributes());
+
+ nRet = noti_ex_geometry_get_x(hGetGeometry, &nGetStyleX);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_x", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nX, nGetStyleX, "noti_ex_style_get_geometry", "noti_ex_style_get_geometry returned different X value", DestroyStyleAttributes());
+
+ nRet = noti_ex_geometry_get_y(hGetGeometry, &nGetStyleY);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_y", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nY, nGetStyleY, "noti_ex_style_get_geometry", "noti_ex_style_get_geometry returned different Y value", DestroyStyleAttributes());
+
+ nRet = noti_ex_geometry_get_width(hGetGeometry, &nGetStyleW);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_width", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nW, nGetStyleW, "noti_ex_style_get_geometry", "noti_ex_style_get_geometry returned different width value", DestroyStyleAttributes());
+
+ nRet = noti_ex_geometry_get_height(hGetGeometry, &nGetStyleH);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_geometry_get_height", NotificationExGetError(nRet), DestroyStyleAttributes());
+ PRINT_RESULT_CLEANUP(g_nH, nGetStyleH, "noti_ex_style_get_geometry", "noti_ex_style_get_geometry returned different height value", DestroyStyleAttributes());
+
+ DestroyStyleAttributes();
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and destroys the notification_ex LED info handle.
+/**
+* @testcase ITc_noti_ex_led_info_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and destroys the notification_ex LED info handle.
+* @scenario Creates notification_ex color and LED info item \n
+* Check handle and Check for Pass/Fail.
+* @apicovered noti_ex_led_info_create, noti_ex_led_info_destroy
+* @passcase noti_ex_led_info_create, noti_ex_led_info_destroy are successful and return correct value
+* @failcase noti_ex_led_info_create, noti_ex_led_info_destroy failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_led_info_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ noti_ex_led_info_h hLedInfo = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ //Target API
+ nRet = noti_ex_led_info_create(&hLedInfo, hColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hLedInfo, "noti_ex_led_info_create", noti_ex_color_destroy(hColor));
+
+ //Target API
+ nRet = noti_ex_led_info_destroy(hLedInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_destroy", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the time period for turning on the LED.
+/**
+* @testcase ITc_noti_ex_led_info_set_get_on_period_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the time period for turning on the LED.
+* @scenario Creates notification_ex color and LED info item \n
+* set On time period and get On time period and Check for Pass/Fail.
+* @apicovered noti_ex_led_info_set_on_period, noti_ex_led_info_get_on_period
+* @passcase noti_ex_led_info_set_on_period, noti_ex_led_info_get_on_period are successful and return correct value
+* @failcase noti_ex_led_info_set_on_period, noti_ex_led_info_get_on_period failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_led_info_set_get_on_period_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ noti_ex_led_info_h hLedInfo = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ int nSetPeriod = 5;
+ int nGetPeriod;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ nRet = noti_ex_led_info_create(&hLedInfo, hColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hLedInfo, "noti_ex_led_info_create", noti_ex_color_destroy(hColor));
+
+ //Target API
+ nRet = noti_ex_led_info_set_on_period(hLedInfo, nSetPeriod);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_set_on_period", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+
+ //Target API
+ nRet = noti_ex_led_info_get_on_period(hLedInfo, &nGetPeriod);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_get_on_period", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+ PRINT_RESULT_CLEANUP(nSetPeriod, nGetPeriod, "noti_ex_led_info_get_on_period", "noti_ex_led_info_get_on_period return value is different from nSetPeriod", noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+
+ nRet = noti_ex_led_info_destroy(hLedInfo);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and Gets the time period for turning off the LED.
+/**
+* @testcase ITc_noti_ex_led_info_set_get_off_period_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and Gets the time period for turning off the LED.
+* @scenario Creates notification_ex color and LED info item \n
+* set off time period and get off time period and Check for Pass/Fail.
+* @apicovered noti_ex_led_info_set_off_period, noti_ex_led_info_get_off_period
+* @passcase noti_ex_led_info_set_off_period, noti_ex_led_info_get_off_period are successful and return correct value
+* @failcase noti_ex_led_info_set_off_period, noti_ex_led_info_get_off_period failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_led_info_set_get_off_period_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_color_h hColor = NULL;
+ noti_ex_led_info_h hLedInfo = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ int nSetPeriod = 5;
+ int nGetPeriod;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ nRet = noti_ex_led_info_create(&hLedInfo, hColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hLedInfo, "noti_ex_led_info_create", noti_ex_color_destroy(hColor));
+
+ //Target API
+ nRet = noti_ex_led_info_set_off_period(hLedInfo, nSetPeriod);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_set_off_period", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+
+ //Target API
+ nRet = noti_ex_led_info_get_off_period(hLedInfo, &nGetPeriod);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_get_off_period", NotificationExGetError(nRet), noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+ PRINT_RESULT_CLEANUP(nSetPeriod, nGetPeriod, "noti_ex_led_info_get_off_period", "noti_ex_led_info_get_off_period return value is different from nSetPeriod", noti_ex_color_destroy(hColor); noti_ex_led_info_destroy(hLedInfo));
+
+ nRet = noti_ex_led_info_destroy(hLedInfo);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the color information from LED info.
+/**
+* @testcase ITc_noti_ex_led_info_get_color_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the color information from LED info.
+* @scenario Creates notification_ex color and LED info item \n
+* get color and compare color attributes with set color attributes and Check for Pass/Fail.
+* @apicovered noti_ex_led_info_get_color
+* @passcase noti_ex_led_info_get_color is successful and return correct value
+* @failcase noti_ex_led_info_get_color failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_led_info_get_color_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_led_info_h hLedInfo = NULL;
+ noti_ex_color_h hColor = NULL;
+ noti_ex_color_h hGetColor = NULL;
+
+ unsigned char cAlpha = 1;
+ unsigned char cRed = 2;
+ unsigned char cGreen = 3;
+ unsigned char cBlue = 4;
+
+ unsigned char cGetStyleAplha, cGetStyleRed, cGetStyleGreen, cGetStyleBlue;
+
+ nRet = noti_ex_color_create(&hColor, cAlpha, cRed, cGreen, cBlue);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hColor, "noti_ex_color_create");
+
+ nRet = noti_ex_led_info_create(&hLedInfo, hColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_create", NotificationExGetError(nRet), noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hLedInfo, "noti_ex_led_info_create", noti_ex_color_destroy(hColor));
+
+ //Target API
+ nRet = noti_ex_led_info_get_color(hLedInfo, &hGetColor);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_get_color", NotificationExGetError(nRet), noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+ CHECK_HANDLE_CLEANUP(hGetColor, "noti_ex_led_info_get_color", noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_get_alpha(hGetColor, &cGetStyleAplha);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_alpha", NotificationExGetError(nRet), noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cAlpha, cGetStyleAplha, "noti_ex_led_info_get_color", "noti_ex_led_info_get_color returned different alpha value", noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_get_red(hGetColor, &cGetStyleRed);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_red", NotificationExGetError(nRet), noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cRed, cGetStyleRed, "noti_ex_led_info_get_color", "noti_ex_led_info_get_color returned different red value", noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_get_green(hGetColor, &cGetStyleGreen);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_green", NotificationExGetError(nRet), noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cGreen, cGetStyleGreen, "noti_ex_led_info_get_color", "noti_ex_led_info_get_color returned different green value", noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_color_get_blue(hGetColor, &cGetStyleBlue);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_get_blue", NotificationExGetError(nRet), noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+ PRINT_RESULT_CLEANUP(cBlue, cGetStyleBlue, "noti_ex_led_info_get_color", "noti_ex_led_info_get_color returned different blue value", noti_ex_led_info_destroy(hLedInfo); noti_ex_color_destroy(hColor));
+
+ nRet = noti_ex_led_info_destroy(hLedInfo);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_led_info_destroy", NotificationExGetError(nRet));
+
+ nRet = noti_ex_color_destroy(hColor);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_color_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the time to hide the notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_info_set_get_hide_time_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the time to hide the notification_ex item.
+* @scenario Creates notification_ex button and get item info\n
+* set and get hide time from item info and compare them and Check for Pass/Fail.
+* @apicovered noti_ex_item_info_set_hide_time, noti_ex_item_info_get_hide_time
+* @passcase noti_ex_item_info_set_hide_time, noti_ex_item_info_get_hide_time are successful and return correct value
+* @failcase noti_ex_item_info_set_hide_time, noti_ex_item_info_get_hide_time failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_info_set_get_hide_time_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_info_h hItemInfo = NULL;
+ int nSetHideTime = 10;
+ int nGetHideTime;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ nRet = noti_ex_item_get_info(g_hItemButton, &hItemInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_info", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hItemInfo, "noti_ex_item_get_info", noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_info_set_hide_time(hItemInfo, nSetHideTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_info_set_hide_time", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_info_get_hide_time(hItemInfo, &nGetHideTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_info_get_hide_time", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(nSetHideTime, nGetHideTime, "noti_ex_item_info_get_hide_time", "noti_ex_item_info_get_hide_time return value is different from nSetHideTime", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sets and gets the time to delete the notification_ex item.
+/**
+* @testcase ITc_noti_ex_item_info_set_get_delete_time_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and gets the time to delete the notification_ex item.
+* @scenario Creates notification_ex button and get item info\n
+* set and get delete time from item info and compare them and Check for Pass/Fail.
+* @apicovered noti_ex_item_info_set_delete_time, noti_ex_item_info_get_delete_time
+* @passcase noti_ex_item_info_set_delete_time, noti_ex_item_info_get_delete_time are successful and return correct value
+* @failcase noti_ex_item_info_set_delete_time, noti_ex_item_info_get_delete_time failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_info_set_get_delete_time_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_info_h hItemInfo = NULL;
+ int nSetDeleteTime = 10;
+ int nGetDeleteTime;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ nRet = noti_ex_item_get_info(g_hItemButton, &hItemInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_info", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hItemInfo, "noti_ex_item_get_info", noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_info_set_delete_time(hItemInfo, nSetDeleteTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_info_set_delete_time", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_info_get_delete_time(hItemInfo, &nGetDeleteTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_info_get_delete_time", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ PRINT_RESULT_CLEANUP(nSetDeleteTime, nGetDeleteTime, "noti_ex_item_info_get_delete_time", "noti_ex_item_info_get_delete_time return value is different from nSetDeleteTime", noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the time information.
+/**
+* @testcase ITc_noti_ex_item_info_get_time_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the time information.
+* @scenario Creates notification_ex button and get item info\n
+* get time information from item info and Check for Pass/Fail.
+* @apicovered noti_ex_item_info_get_time
+* @passcase noti_ex_item_info_get_time is successful and return correct value
+* @failcase noti_ex_item_info_get_time failed or return null value
+* @precondition NA
+* @postcondition Destroy handle.
+*/
+int ITc_noti_ex_item_info_get_time_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_item_info_h hItemInfo = NULL;
+ time_t tGetTime;
+
+ nRet = CreateButton();
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hItemButton, "noti_ex_item_button_create");
+
+ nRet = noti_ex_item_get_info(g_hItemButton, &hItemInfo);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_get_info", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+ CHECK_HANDLE_CLEANUP(hItemInfo, "noti_ex_item_get_info", noti_ex_item_destroy(g_hItemButton));
+
+ //Target API
+ nRet = noti_ex_item_info_get_time(hItemInfo, &tGetTime);
+ PRINT_RESULT_CLEANUP(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_info_get_time", NotificationExGetError(nRet), noti_ex_item_destroy(g_hItemButton));
+
+ nRet = noti_ex_item_destroy(g_hItemButton);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Clones and Releases the notification event info handle.
+/**
+* @testcase ITc_noti_ex_event_info_clone_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Clones and Releases the notification event info handle.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_clone, noti_ex_event_info_destroy
+* @passcase noti_ex_event_info_clone and noti_ex_event_info_destroy are successful and return correct value
+* @failcase noti_ex_event_info_clone and/or noti_ex_event_info_destroy failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_clone_destroy_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_CLONE;
+
+ //Target API
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit for noti_ex_event_info_clone()\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_clone() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ //Target API
+ g_eEventInfoAPI = EX_EVENT_INFO_DESTROY;
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit for noti_ex_event_info_destroy()\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_destroy() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the type of an event.
+/**
+* @testcase ITc_noti_ex_event_info_get_event_type_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the type of an event.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_get_event_type
+* @passcase noti_ex_event_info_get_event_type is successful and return correct value
+* @failcase noti_ex_event_info_get_event_type failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_get_event_type_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_GET_EVENT_TYPE;
+
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_get_event_type() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the app id of event owner.
+/**
+* @testcase ITc_noti_ex_event_info_get_owner_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the app id of event owner.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_get_owner
+* @passcase noti_ex_event_info_get_owner is successful and return correct value
+* @failcase noti_ex_event_info_get_owner failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_get_owner_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_GET_OWNER;
+
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_get_owner() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the channel of an event.
+/**
+* @testcase ITc_noti_ex_event_info_get_channel_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the channel of an event.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_get_channel
+* @passcase noti_ex_event_info_get_channel is successful and return correct value
+* @failcase noti_ex_event_info_get_channel failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_get_channel_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_GET_CHANNEL;
+
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_get_channel() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the id of a notification_ex item.
+/**
+* @testcase ITc_noti_ex_event_info_get_item_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the id of a notification_ex item.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_get_item_id
+* @passcase noti_ex_event_info_get_item_id is successful and return correct value
+* @failcase noti_ex_event_info_get_item_id failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_get_item_id_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_GET_ITEM_ID;
+
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_get_item_id() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the id of request for an event.
+/**
+* @testcase ITc_noti_ex_event_info_get_request_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the id of request for an event.
+* @scenario Creates notification_ex manager and event handler \n
+* register callbacks, set flag to invole specific API in callback \n
+* call SendNotification helper function to invoke callback and Check for callback hit.
+* @apicovered noti_ex_event_info_get_request_id
+* @passcase noti_ex_event_info_get_request_id is successful and return correct value
+* @failcase noti_ex_event_info_get_request_id failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_event_info_get_request_id_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = EventinfoGettestEventsAddCB;
+ hEventManger.error = EventinfoManagerEventsErrorCB;
+
+ g_CallBackHit = false;
+ g_eEventInfoAPI = EX_EVENT_INFO_GET_REQUEST_ID;
+
+ nRet = noti_ex_manager_create(&g_hEventinfoManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] EventinfoManagerEventsErrorCB or EventinfoGettestEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_event_info_get_request_id() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_manager_destroy(g_hEventinfoManager);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and Destroys the notification_ex manager handle.
+/**
+* @testcase ITc_noti_ex_manager_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and Destroys the notification_ex manager handle.
+* @scenario Creates notification_ex manager and event handler \n
+* register add, update, delete and error callbacks and Check for pass/fail.
+* @apicovered noti_ex_manager_create, noti_ex_manager_destroy
+* @passcase noti_ex_manager_create and noti_ex_manager_destroy are successful and return correct value
+* @failcase noti_ex_manager_create and/or noti_ex_manager_destroy failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_create_destroy_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_manager_h hManager;
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = ManagerEventsAddCB;
+ hEventManger.updated = ManagerEventsUpdateCB;
+ hEventManger.deleted = ManagerEventsDeleteCB;
+ hEventManger.error = ManagerEventsErrorCB;
+
+ //Target API
+ nRet = noti_ex_manager_create(&hManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+ CHECK_HANDLE(hManager, "noti_ex_manager_create");
+
+ //Target API
+ nRet = noti_ex_manager_destroy(hManager);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets all notifications for the notification_ex manager.
+/**
+* @testcase ITc_noti_ex_manager_get_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets all notifications for the notification_ex manager.
+* @scenario Creates notification_ex manager and event handler \n
+* register add and error callback, call SendNotification helper function \n
+* to invoke callback and Check for callback hit.
+* @apicovered noti_ex_manager_get
+* @passcase noti_ex_manager_get is successful and return correct value
+* @failcase callback not hit or noti_ex_manager_get failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_get_p(void)
+{
+ START_TEST;
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nTimeoutId = 0;
+ noti_ex_manager_events_s hEventManger = {0};
+ g_CallBackHit = false;
+
+ hEventManger.added = GettestEventsAddCB;
+ hEventManger.error = ManagerEventsErrorCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] GettestEventsAddCB or ManagerEventsErrorCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_manager_get() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Updates notification.
+/**
+* @testcase ITc_noti_ex_manager_update_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Updates notification.
+* @scenario Creates notification_ex manager and event handler, get items from ex_manager \n
+* update item and check for pass/fail.
+* @apicovered noti_ex_manager_update
+* @passcase noti_ex_manager_update is successful and return correct value
+* @failcase noti_ex_manager_update failed
+* @precondition NA
+* @postcondition destroy item handle.
+*/
+int ITc_noti_ex_manager_update_p(void)
+{
+ START_TEST;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ noti_ex_item_h *hItems;
+ noti_ex_item_h *hItem;
+ noti_ex_manager_h hExManager;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nItemsCnt;
+ int nReqID;
+ int nLoopCnt;
+
+ nRet = noti_ex_manager_create(&hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_manager_create");
+
+ nRet = noti_ex_manager_get(hExManager, &hItems, &nItemsCnt);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_get", NotificationExGetError(nRet));
+
+ for (nLoopCnt = 0; nLoopCnt < nItemsCnt; nLoopCnt++)
+ {
+ hItem = hItems[nLoopCnt];
+ //Target API
+ nRet = noti_ex_manager_update(hExManager, hItem, &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_update", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hItem);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Deletes notification.
+/**
+* @testcase ITc_noti_ex_manager_delete_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Deletes notification.
+* @scenario Creates notification_ex manager and event handler \n
+* register add and error callback, call SendNotification helper function \n
+* to invoke callback and Check for callback hit.
+* @apicovered noti_ex_manager_delete
+* @passcase noti_ex_manager_delete is successful and return correct value
+* @failcase callback not hit or noti_ex_manager_delete failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_delete_p(void)
+{
+ START_TEST;
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nTimeoutId = 0;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ g_CallBackHit = false;
+
+ g_hExManager = NULL;
+ hEventManger.added = DeletetestEventsAddCB;
+ hEventManger.error = ManagerEventsErrorCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] DeletetestEventsAddCB or ManagerEventsErrorCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_manager_delete() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Deletes all notification.
+/**
+* @testcase ITc_noti_ex_manager_delete_all_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Deletes all notification.
+* @scenario Creates notification_ex manager and event handler, get items from ex_manager \n
+* delete all item and check for pass/fail.
+* @apicovered noti_ex_manager_delete_all
+* @passcase noti_ex_manager_delete_all is successful and return correct value
+* @failcase noti_ex_manager_delete_all failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_delete_all_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nReqID;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ noti_ex_manager_h hExManager;
+
+ nRet = noti_ex_manager_create(&hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hExManager, "noti_ex_manager_create");
+
+ //Target API
+ nRet = noti_ex_manager_delete_all(hExManager, &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_delete_all", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Hides notification.
+/**
+* @testcase ITc_noti_ex_manager_hide_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Hides notification.
+* @scenario Creates notification_ex manager and event handler, get items from ex_manager \n
+* hide item and check for pass/fail.
+* @apicovered noti_ex_manager_hide
+* @passcase noti_ex_manager_hide is successful and return correct value
+* @failcase noti_ex_manager_hide failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_hide_p(void)
+{
+ START_TEST;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+ int nItemsCnt;
+ int nReqID;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ noti_ex_manager_h hExManager;
+ noti_ex_item_h *hItems;
+ noti_ex_item_h *hItem;
+
+ nRet = noti_ex_manager_create(&hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hExManager, "noti_ex_manager_create");
+
+ nRet = noti_ex_manager_get(hExManager, &hItems, &nItemsCnt);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_get", NotificationExGetError(nRet));
+
+ int nLoopCnt;
+ for (nLoopCnt = 0; nLoopCnt < nItemsCnt; nLoopCnt++)
+ {
+ hItem = hItems[nLoopCnt];
+ //Target API
+ nRet = noti_ex_manager_hide(hExManager, hItem, &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_hide", NotificationExGetError(nRet));
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Finds notification by root id.
+/**
+* @testcase ITc_noti_ex_manager_find_by_root_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Finds notification by root id.
+* @scenario Creates notification_ex manager and event handler, get items from ex_manager \n
+* find item by root id and check for pass/fail.
+* @apicovered noti_ex_manager_find_by_root_id
+* @passcase noti_ex_manager_find_by_root_id is successful and return correct value
+* @failcase noti_ex_manager_find_by_root_id failed
+* @precondition NA
+* @postcondition destroy item handle
+*/
+int ITc_noti_ex_manager_find_by_root_id_p(void)
+{
+ START_TEST;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ noti_ex_manager_h hExManager;
+ noti_ex_item_h hFindItem;
+
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ nRet = noti_ex_manager_create(&hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hExManager, "noti_ex_manager_create");
+
+ //Target API
+ nRet = noti_ex_manager_find_by_root_id(hExManager, "testgroup", &hFindItem);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_find_by_root_id", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_destroy(hFindItem);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sends error to the reporter.
+/**
+* @testcase ITc_noti_ex_manager_send_error_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sends error to the reporter.
+* @scenario Creates notification_ex manager and event handler \n
+* register add and error callback, call SendNotification helper function \n
+* to invoke callback and Check for callback hit.
+* @apicovered noti_ex_manager_send_error
+* @passcase noti_ex_manager_send_error is successful and return correct value
+* @failcase callback not hit or noti_ex_manager_send_error failed
+* @precondition NA
+* @postcondition destroy item handle
+*/
+int ITc_noti_ex_manager_send_error_p(void)
+{
+ START_TEST;
+
+ int nTimeoutId = 0;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+
+ hEventManger.added = SendErrorEventsAddCB;
+ hEventManger.error = ManagerEventsErrorCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_manager_create");
+
+ nRet = SendNotification();
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside SendNotification() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] SendErrorEventsAddCB or ManagerEventsErrorCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_manager_send_error() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Gets the count of notifications for the manager.
+/**
+* @testcase ITc_noti_ex_manager_get_notification_count_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the count of notifications for the manager.
+* @scenario Creates notification_ex manager and event handler \n
+* get notification count and check for pass/fail.
+* @apicovered noti_ex_manager_get_notification_count
+* @passcase noti_ex_manager_get_notification_count is successful and return correct value
+* @failcase noti_ex_manager_get_notification_count failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_manager_get_notification_count_p(void)
+{
+ START_TEST;
+ noti_ex_manager_h hExManager;
+ int nCnt;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_manager_events_s hEventManger = {0};
+
+ nRet = noti_ex_manager_create(&hExManager, NOTI_EX_RECEIVER_GROUP_INDICATOR, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hExManager, "noti_ex_manager_create");
+
+ //Target API
+ nRet = noti_ex_manager_get_notification_count(hExManager, &nCnt);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_get_notification_count", NotificationExGetError(nRet));
+ FPRINTF("[Line : %d][%s] Getcount value is [%d]\\n", __LINE__, API_NAMESPACE, nCnt);
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Creates and Destroys the notification_ex reporter handle.
+/**
+* @testcase ITc_noti_ex_reporter_create_destroy_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Creates and Destroys the notification_ex manager handle.
+* @scenario Creates notification_ex reporter and reporter event handler \n
+* register event and error callbacks and Check for pass/fail.
+* @apicovered noti_ex_reporter_create, noti_ex_reporter_destroy
+* @passcase noti_ex_reporter_create and noti_ex_reporter_destroy are successful and return correct value
+* @failcase noti_ex_reporter_create and/or noti_ex_reporter_destroy failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_create_destroy_p(void)
+{
+ START_TEST;
+ noti_ex_reporter_h hExReporter;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_reporter_events_s hEventReporter = {0};
+ hEventReporter.event = ReporterEventsEventCB;
+ hEventReporter.error = ReporterEventsErrorCB;
+
+ //Target API
+ nRet = noti_ex_reporter_create(&hExReporter, hEventReporter, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(hExReporter, "noti_ex_reporter_create");
+
+ //Target API
+ nRet = noti_ex_reporter_destroy(hExReporter);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_destroy", NotificationExGetError(nRet));
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Sends error to the manager.
+/**
+* @testcase ITc_noti_ex_reporter_send_error_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sends error to the manager.
+* @scenario Creates notification_ex reporter and reporter event handler \n
+* register event and error callback, create button group \n
+* post group item on handler to invoke callback.
+* @apicovered noti_ex_reporter_send_error
+* @passcase noti_ex_reporter_send_error is successful and return correct value
+* @failcase noti_ex_reporter_send_error failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_send_error_p(void)
+{
+ START_TEST;
+
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = SendErrorManagerEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+
+ noti_ex_reporter_events_s hEventReporter = {0};
+ hEventReporter.event = SendErrorEventsEventCB;
+ hEventReporter.error = ReporterEventsErrorCB;
+
+ nRet = noti_ex_reporter_create(&g_hEventinfoReporter, hEventReporter, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hEventinfoReporter, "noti_ex_reporter_create");
+
+ noti_ex_item_h hGroupItem = NULL;
+ noti_ex_item_h hButtonItem1 = NULL;
+ noti_ex_item_h hButtonItem2 = NULL;
+
+ nRet = noti_ex_item_group_create(&hGroupItem, "testgroup");
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_create", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_button_create(&hButtonItem1, "testbtn1", "test1");
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_group_add_child(hGroupItem, hButtonItem1);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_add_child", NotificationExGetError(nRet));
+
+ nRet = noti_ex_item_button_create(&hButtonItem2, "testbtn2", "test2");
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_button_create", NotificationExGetError(nRet));
+ nRet = noti_ex_item_group_add_child(hGroupItem, hButtonItem2);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_item_group_add_child", NotificationExGetError(nRet));
+
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hGroupItem, &nReqID);
+ PRINT_RESULT_NORETURN(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_reporter_send_error() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Posts a notification.
+/**
+* @testcase ITc_noti_ex_reporter_post_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Posts a notification.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_post
+* @passcase noti_ex_reporter_post is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_post failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_post_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = PostEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ //Target API
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hNotiList[0], &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] PostEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Posts notifications contained in a list.
+/**
+* @testcase ITc_noti_ex_reporter_post_list_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Posts notifications contained in a list.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_post_list
+* @passcase noti_ex_reporter_post_list is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_post_list failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_post_list_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = PostEventsListAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ //Target API
+ nRet = noti_ex_reporter_post_list(g_hEventinfoReporter, hNotiList, 1, &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post_list", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] PostEventsListAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Updates a notification.
+/**
+* @testcase ITc_noti_ex_reporter_update_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Updates a notification.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_update
+* @passcase noti_ex_reporter_update is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_update failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_update_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = UpdateEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hNotiList[0], &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] UpdateEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_reporter_update() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Deletes a notification.
+/**
+* @testcase ITc_noti_ex_reporter_delete_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Deletes a notification.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_delete
+* @passcase noti_ex_reporter_delete is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_delete failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_delete_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = DeleteEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hNotiList[0], &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] DeleteEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_reporter_delete() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Deletes all notification.
+/**
+* @testcase ITc_noti_ex_reporter_delete_all_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Deletes all notification.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_delete_all
+* @passcase noti_ex_reporter_delete_all is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_delete_all failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_delete_all_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = DeleteallEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hNotiList[0], &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] DeleteallEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_reporter_delete_all() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+//& type : auto
+//& purpose: Finds notification by root id.
+/**
+* @testcase ITc_noti_ex_reporter_find_by_root_id_p
+* @since_tizen 5.5
+* @author SRID(j.abhishek)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Finds notification by root id.
+* @scenario Creates notification_ex reporter handle and manager event handler \n
+* register add callback, create Notification list with helper function \n
+* post notification list on handler to invoke callback, check for callback hit.
+* @apicovered noti_ex_reporter_find_by_root_id
+* @passcase noti_ex_reporter_find_by_root_id is successful and return correct value
+* @failcase callback not hit or noti_ex_reporter_find_by_root_id failed
+* @precondition NA
+* @postcondition NA
+*/
+int ITc_noti_ex_reporter_find_by_root_id_p(void)
+{
+ START_TEST;
+
+ noti_ex_item_h *hNotiList = NULL;
+ int nTimeoutId = 0;
+ int nReqID;
+ int nRet = NOTI_EX_ERROR_NONE;
+ g_CallBackHit = false;
+
+ noti_ex_manager_events_s hEventManger = {0};
+ hEventManger.added = FindbyrootidEventsAddCB;
+
+ nRet = noti_ex_manager_create(&g_hExManager, NULL, hEventManger, NULL);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_manager_create", NotificationExGetError(nRet));
+ CHECK_HANDLE(g_hExManager, "noti_ex_reporter_create");
+
+ nRet = CreateNotificationList(&hNotiList);
+ if(nRet)
+ {
+ FPRINTF("[Line : %d][%s] One of the API called inside CreateNotificationList() is failed and returned \\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ nRet = noti_ex_reporter_post(g_hEventinfoReporter, hNotiList[0], &nReqID);
+ PRINT_RESULT(NOTI_EX_ERROR_NONE, nRet, "noti_ex_reporter_post", NotificationExGetError(nRet));
+
+ RUN_POLLING_LOOP;
+ if(!g_CallBackHit)
+ {
+ FPRINTF("[Line : %d][%s] FindbyrootidEventsAddCB Callback not hit\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ if (g_bAPIFailed)
+ {
+ FPRINTF("[Line : %d][%s] noti_ex_reporter_find_by_root_id() target API failed\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+
+ return 0;
+}
+
+/** @} */ //end of itc-notification-ex
+/** @} */ //end of itc-notification-testcases
+