From: Sundaram Bhupathi Date: Mon, 11 Dec 2023 09:10:42 +0000 (+0530) Subject: [Do Not Merge][UTC][oauth2] TC added for New API X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fref%2Ffor%2Ftizen;p=test%2Ftct%2Fnative%2Fapi.git [Do Not Merge][UTC][oauth2] TC added for New API Change-Id: Ic45a1fe0df1758b6ce131a3b7fc034bae15a6655 Signed-off-by: Sundaram Bhupathi --- diff --git a/src/utc/oauth2/tct-oauth2-core_mobile.h b/src/utc/oauth2/tct-oauth2-core_mobile.h index 6b093814b..4e18c52d0 100755 --- a/src/utc/oauth2/tct-oauth2-core_mobile.h +++ b/src/utc/oauth2/tct-oauth2-core_mobile.h @@ -27,6 +27,7 @@ extern int utc_oauth2_manager_create_n(void); extern int utc_oauth2_manager_destroy_p(void); extern int utc_oauth2_manager_destroy_n(void); extern int utc_oauth2_manager_request_token_n(void); +extern int utc_oauth2_manager_request_token_auth_url_n(void); extern int utc_oauth2_manager_request_authorization_grant_n(void); extern int utc_oauth2_manager_request_access_token_n(void); extern int utc_oauth2_manager_refresh_access_token_n(void); @@ -118,6 +119,7 @@ testcase tc_array[] = { {"utc_oauth2_manager_destroy_p",utc_oauth2_manager_destroy_p,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_destroy_n",utc_oauth2_manager_destroy_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_token_n",utc_oauth2_manager_request_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, + {"utc_oauth2_manager_request_token_auth_url_n",utc_oauth2_manager_request_token_auth_url_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_authorization_grant_n",utc_oauth2_manager_request_authorization_grant_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_access_token_n",utc_oauth2_manager_request_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_refresh_access_token_n",utc_oauth2_manager_refresh_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, diff --git a/src/utc/oauth2/tct-oauth2-core_tizeniot.h b/src/utc/oauth2/tct-oauth2-core_tizeniot.h index 6b093814b..4e18c52d0 100755 --- a/src/utc/oauth2/tct-oauth2-core_tizeniot.h +++ b/src/utc/oauth2/tct-oauth2-core_tizeniot.h @@ -27,6 +27,7 @@ extern int utc_oauth2_manager_create_n(void); extern int utc_oauth2_manager_destroy_p(void); extern int utc_oauth2_manager_destroy_n(void); extern int utc_oauth2_manager_request_token_n(void); +extern int utc_oauth2_manager_request_token_auth_url_n(void); extern int utc_oauth2_manager_request_authorization_grant_n(void); extern int utc_oauth2_manager_request_access_token_n(void); extern int utc_oauth2_manager_refresh_access_token_n(void); @@ -118,6 +119,7 @@ testcase tc_array[] = { {"utc_oauth2_manager_destroy_p",utc_oauth2_manager_destroy_p,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_destroy_n",utc_oauth2_manager_destroy_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_token_n",utc_oauth2_manager_request_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, + {"utc_oauth2_manager_request_token_auth_url_n",utc_oauth2_manager_request_token_auth_url_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_authorization_grant_n",utc_oauth2_manager_request_authorization_grant_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_access_token_n",utc_oauth2_manager_request_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_refresh_access_token_n",utc_oauth2_manager_refresh_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, diff --git a/src/utc/oauth2/tct-oauth2-core_wearable.h b/src/utc/oauth2/tct-oauth2-core_wearable.h index 6b093814b..4e18c52d0 100755 --- a/src/utc/oauth2/tct-oauth2-core_wearable.h +++ b/src/utc/oauth2/tct-oauth2-core_wearable.h @@ -27,6 +27,7 @@ extern int utc_oauth2_manager_create_n(void); extern int utc_oauth2_manager_destroy_p(void); extern int utc_oauth2_manager_destroy_n(void); extern int utc_oauth2_manager_request_token_n(void); +extern int utc_oauth2_manager_request_token_auth_url_n(void); extern int utc_oauth2_manager_request_authorization_grant_n(void); extern int utc_oauth2_manager_request_access_token_n(void); extern int utc_oauth2_manager_refresh_access_token_n(void); @@ -118,6 +119,7 @@ testcase tc_array[] = { {"utc_oauth2_manager_destroy_p",utc_oauth2_manager_destroy_p,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_destroy_n",utc_oauth2_manager_destroy_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_token_n",utc_oauth2_manager_request_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, + {"utc_oauth2_manager_request_token_auth_url_n",utc_oauth2_manager_request_token_auth_url_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_authorization_grant_n",utc_oauth2_manager_request_authorization_grant_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_request_access_token_n",utc_oauth2_manager_request_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, {"utc_oauth2_manager_refresh_access_token_n",utc_oauth2_manager_refresh_access_token_n,utc_oauth2_startup,utc_oauth2_cleanup}, diff --git a/src/utc/oauth2/utc-oauth2.c b/src/utc/oauth2/utc-oauth2.c index 16b62c0e4..1ba58f2e1 100755 --- a/src/utc/oauth2/utc-oauth2.c +++ b/src/utc/oauth2/utc-oauth2.c @@ -133,6 +133,22 @@ int utc_oauth2_manager_request_token_n(void) return 0; } + +/** + * @testcase utc_oauth2_manager_request_token_auth_url_n + * @since_tizen 9.0 + * @description This negative TC tests oauth2 manager request token auth URL with invalid inputs + */ +int utc_oauth2_manager_request_token_auth_url_n(void) +{ + int ret = OAUTH2_ERROR_NONE; + + ret = oauth2_manager_request_token_auth_url(NULL, NULL, NULL, NULL); + assert_eq(ret, OAUTH2_ERROR_INVALID_PARAMETER); + + return 0; +} + /** * @testcase utc_oauth2_manager_request_authorization_grant_n * @since_tizen 2.4