extern int utc_http_transaction_request_get_cookie_p(void);
extern int utc_http_transaction_request_write_body_n(void);
extern int utc_http_transaction_request_write_body_p(void);
+extern int utc_http_transaction_set_http_auth_scheme_n(void);
+extern int utc_http_transaction_set_http_auth_scheme_p(void);
+extern int utc_http_transaction_get_http_auth_scheme_n(void);
+extern int utc_http_transaction_get_http_auth_scheme_p(void);
+extern int utc_http_transaction_set_credentials_n(void);
+extern int utc_http_transaction_set_credentials_p(void);
+extern int utc_http_transaction_get_credentials_n(void);
+extern int utc_http_transaction_get_credentials_p(void);
+extern int utc_http_transaction_open_authentication_n(void);
+extern int utc_http_transaction_open_authentication_p(void);
extern int utc_http_transaction_submit_n(void);
extern int utc_http_transaction_submit_p(void);
extern int utc_http_deinit_n(void);
{"utc_http_transaction_request_get_cookie_p", utc_http_transaction_request_get_cookie_p, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_request_write_body_n", utc_http_transaction_request_write_body_n, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_request_write_body_p", utc_http_transaction_request_write_body_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_http_auth_scheme_n", utc_http_transaction_set_http_auth_scheme_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_http_auth_scheme_p", utc_http_transaction_set_http_auth_scheme_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_http_auth_scheme_n", utc_http_transaction_get_http_auth_scheme_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_http_auth_scheme_p", utc_http_transaction_get_http_auth_scheme_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_credentials_n", utc_http_transaction_set_credentials_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_credentials_p", utc_http_transaction_set_credentials_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_credentials_n", utc_http_transaction_get_credentials_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_credentials_p", utc_http_transaction_get_credentials_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_open_authentication_n", utc_http_transaction_open_authentication_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_open_authentication_p", utc_http_transaction_open_authentication_p, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_submit_n", utc_http_transaction_submit_n, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_submit_p", utc_http_transaction_submit_p, utc_http_startup, utc_http_cleanup},
{"utc_http_deinit_p", utc_http_deinit_p, utc_http_startup, utc_http_cleanup},
extern int utc_http_transaction_request_get_cookie_p(void);
extern int utc_http_transaction_request_write_body_n(void);
extern int utc_http_transaction_request_write_body_p(void);
+extern int utc_http_transaction_set_http_auth_scheme_n(void);
+extern int utc_http_transaction_set_http_auth_scheme_p(void);
+extern int utc_http_transaction_get_http_auth_scheme_n(void);
+extern int utc_http_transaction_get_http_auth_scheme_p(void);
+extern int utc_http_transaction_set_credentials_n(void);
+extern int utc_http_transaction_set_credentials_p(void);
+extern int utc_http_transaction_get_credentials_n(void);
+extern int utc_http_transaction_get_credentials_p(void);
+extern int utc_http_transaction_open_authentication_n(void);
+extern int utc_http_transaction_open_authentication_p(void);
extern int utc_http_transaction_submit_n(void);
extern int utc_http_transaction_submit_p(void);
extern int utc_http_deinit_n(void);
{"utc_http_transaction_request_get_cookie_p", utc_http_transaction_request_get_cookie_p, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_request_write_body_n", utc_http_transaction_request_write_body_n, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_request_write_body_p", utc_http_transaction_request_write_body_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_http_auth_scheme_n", utc_http_transaction_set_http_auth_scheme_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_http_auth_scheme_p", utc_http_transaction_set_http_auth_scheme_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_http_auth_scheme_n", utc_http_transaction_get_http_auth_scheme_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_http_auth_scheme_p", utc_http_transaction_get_http_auth_scheme_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_credentials_n", utc_http_transaction_set_credentials_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_set_credentials_p", utc_http_transaction_set_credentials_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_credentials_n", utc_http_transaction_get_credentials_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_get_credentials_p", utc_http_transaction_get_credentials_p, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_open_authentication_n", utc_http_transaction_open_authentication_n, utc_http_startup, utc_http_cleanup},
+ {"utc_http_transaction_open_authentication_p", utc_http_transaction_open_authentication_p, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_submit_n", utc_http_transaction_submit_n, utc_http_startup, utc_http_cleanup},
{"utc_http_transaction_submit_p", utc_http_transaction_submit_p, utc_http_startup, utc_http_cleanup},
{"utc_http_deinit_p", utc_http_deinit_p, utc_http_startup, utc_http_cleanup},
}
/**
+ * @testcase utc_http_transaction_set_http_auth_scheme_n
+ * @since_tizen 3.0
+ * @type Negative
+ * @description Sets an HTTP authentication scheme.
+ * @scenario Invoking http_transaction_set_http_auth_scheme with invalid parameter.
+ */
+int utc_http_transaction_set_http_auth_scheme_n(void)
+{
+ int ret;
+ http_auth_scheme_e auth_scheme = HTTP_AUTH_WWW_BASIC;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_set_http_auth_scheme(NULL, auth_scheme);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_set_http_auth_scheme(NULL, auth_scheme);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_set_http_auth_scheme_p
+ * @since_tizen 3.0
+ * @type Positive
+ * @description Sets an HTTP authentication scheme.
+ * @scenario Invoking http_transaction_set_http_auth_scheme with valid parameter.
+ */
+int utc_http_transaction_set_http_auth_scheme_p(void)
+{
+ int ret;
+ http_auth_scheme_e auth_scheme = HTTP_AUTH_WWW_BASIC;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_set_http_auth_scheme(transaction, auth_scheme);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_set_http_auth_scheme(transaction, auth_scheme);
+ assert_eq(ret, HTTP_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_get_http_auth_scheme_n
+ * @since_tizen 3.0
+ * @type Negative
+ * @description Gets the HTTP authentication scheme.
+ * @scenario Invoking http_transaction_get_http_auth_scheme with invalid parameter.
+ */
+int utc_http_transaction_get_http_auth_scheme_n(void)
+{
+ int ret;
+ http_auth_scheme_e auth_scheme;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_get_http_auth_scheme(NULL, NULL);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_get_http_auth_scheme(transaction, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_get_http_auth_scheme(NULL, &auth_scheme);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_get_http_auth_scheme(NULL, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_get_http_auth_scheme_p
+ * @since_tizen 3.0
+ * @type Positive
+ * @description Gets the HTTP authentication scheme.
+ * @scenario Invoking http_transaction_get_http_auth_scheme with valid parameter.
+ */
+int utc_http_transaction_get_http_auth_scheme_p(void)
+{
+ int ret;
+ http_auth_scheme_e auth_scheme;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_get_http_auth_scheme(transaction, auth_scheme);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_set_http_auth_scheme(transaction, HTTP_AUTH_WWW_BASIC);
+ assert_eq(ret, HTTP_ERROR_NONE);
+ ret = http_transaction_get_http_auth_scheme(transaction, &auth_scheme);
+ assert_eq(ret, HTTP_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_set_credentials_n
+ * @since_tizen 3.0
+ * @type Negative
+ * @description Sets an HTTP credentials.
+ * @scenario Invoking http_transaction_set_credentials with invalid parameter.
+ */
+int utc_http_transaction_set_credentials_n(void)
+{
+ int ret;
+ const char user_name[10] = "tizen";
+ const char password[10] = "q1w2e3r4";
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_set_credentials(NULL, NULL, NULL);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_set_credentials(transaction, user_name, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_set_credentials(transaction, NULL, password);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_set_credentials(NULL, user_name, password);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_set_credentials(NULL, NULL, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_set_credentials_p
+ * @since_tizen 3.0
+ * @type Positive
+ * @description Sets an HTTP credentials.
+ * @scenario Invoking http_transaction_set_credentials with valid parameter.
+ */
+int utc_http_transaction_set_credentials_p(void)
+{
+ int ret;
+ const char user_name[10] = "tizen";
+ const char password[10] = "q1w2e3r4";
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_set_credentials(transaction, user_name, password);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+ ret = http_transaction_set_credentials(transaction, user_name, password);
+ assert_eq(ret, HTTP_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_get_credentials_n
+ * @since_tizen 3.0
+ * @type Negative
+ * @description Gets the username & password for the http credential.
+ * @scenario Invoking http_transaction_get_credentials with invalid parameter.
+ */
+int utc_http_transaction_get_credentials_n(void)
+{
+ int ret;
+ char *user_name;
+ char *password;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_get_credentials(NULL, NULL, NULL);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_set_credentials(transaction, "tizen", "q1w2e3r4");
+ assert_eq(ret, HTTP_ERROR_NONE);
+ ret = http_transaction_get_credentials(transaction, &user_name, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_get_credentials(transaction, NULL, &password);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_get_credentials(NULL, &user_name, &password);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+ ret = http_transaction_get_credentials(NULL, NULL, NULL);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_get_credentials_p
+ * @since_tizen 3.0
+ * @type Positive
+ * @description Gets the username & password for the http credential.
+ * @scenario Invoking http_transaction_get_credentials with valid parameter.
+ */
+int utc_http_transaction_get_credentials_p(void)
+{
+ int ret;
+ char *user_name;
+ char *password;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_get_credentials(transaction, &user_name, &password);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+ ret = http_transaction_set_credentials(transaction, "tizen", "q1w2e3r4");
+ assert_eq(ret, HTTP_ERROR_NONE);
+ ret = http_transaction_get_credentials(transaction, &user_name, &password);
+ assert_eq(ret, HTTP_ERROR_NONE);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_open_authentication_n
+ * @since_tizen 3.0
+ * @type Negative
+ * @description Opens HTTP transaction with authentication information.
+ * @scenario Invoking http_transaction_open_authentication with invalid parameter.
+ */
+int utc_http_transaction_open_authentication_n(void)
+{
+ int ret;
+ http_transaction_h http_auth_transaction;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_open_authentication(NULL, &http_auth_transaction);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_open_authentication(NULL, &http_auth_transaction);
+ assert_eq(ret, HTTP_ERROR_INVALID_PARAMETER);
+
+ return 0;
+}
+
+/**
+ * @testcase utc_http_transaction_open_authentication_p
+ * @since_tizen 3.0
+ * @type Positive
+ * @description Opens HTTP transaction with authentication information.
+ * @scenario Invoking http_transaction_open_authentication with valid parameter.
+ */
+int utc_http_transaction_open_authentication_p(void)
+{
+ int ret;
+ http_transaction_h http_auth_transaction;
+
+#ifdef WEARABLE
+ if (g_internet_supported == false) {
+ ret = http_transaction_open_authentication(transaction, &http_auth_transaction);
+ assert_eq(ret, TIZEN_ERROR_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
+ ret = http_transaction_open_authentication(transaction, &http_auth_transaction);
+ assert_eq(ret, HTTP_ERROR_NONE);
+
+ return 0;
+}
+
+/**
* @testcase utc_http_transaction_submit_n
* @since_tizen 3.0
* @type Negative