[Do Not Merge][UTC][oauth2] TC added for New API ref/for/tizen
authorSundaram Bhupathi <s.bhupathi@samsung.com>
Mon, 11 Dec 2023 09:10:42 +0000 (14:40 +0530)
committerSundaram Bhupathi <s.bhupathi@samsung.com>
Mon, 11 Dec 2023 09:10:42 +0000 (14:40 +0530)
Change-Id: Ic45a1fe0df1758b6ce131a3b7fc034bae15a6655
Signed-off-by: Sundaram Bhupathi <s.bhupathi@samsung.com>
src/utc/oauth2/tct-oauth2-core_mobile.h
src/utc/oauth2/tct-oauth2-core_tizeniot.h
src/utc/oauth2/tct-oauth2-core_wearable.h
src/utc/oauth2/utc-oauth2.c

index 6b093814b8f8ef2433d942e038492fecf5065319..4e18c52d040e50979dbbfb6da48814de36d24aff 100755 (executable)
@@ -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},
index 6b093814b8f8ef2433d942e038492fecf5065319..4e18c52d040e50979dbbfb6da48814de36d24aff 100755 (executable)
@@ -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},
index 6b093814b8f8ef2433d942e038492fecf5065319..4e18c52d040e50979dbbfb6da48814de36d24aff 100755 (executable)
@@ -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},
index 16b62c0e4a9f5f46ec5f1ab3d2fc435cb09086b7..1ba58f2e18f1f77872694167746fae04420fcb62 100755 (executable)
@@ -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