extern int utc_storage_unset_state_changed_cb_p(void);
extern int utc_storage_unset_state_changed_cb_n_1(void);
extern int utc_storage_unset_state_changed_cb_n_2(void);
+extern int utc_storage_set_changed_cb_p(void);
+extern int utc_storage_set_changed_cb_n_1(void);
+extern int utc_storage_set_changed_cb_n_2(void);
+extern int utc_storage_set_changed_cb_n_3(void);
+extern int utc_storage_unset_changed_cb_p(void);
+extern int utc_storage_unset_changed_cb_n_1(void);
+extern int utc_storage_unset_changed_cb_n_2(void);
+extern int utc_storage_unset_changed_cb_n_3(void);
testcase tc_array[] = {
{"utc_system_storage_get_internal_memory_size_p", utc_system_storage_get_internal_memory_size_p, NULL, NULL},
{"utc_storage_unset_state_changed_cb_p", utc_storage_unset_state_changed_cb_p, utc_storage_startup, NULL},
{"utc_storage_unset_state_changed_cb_n_1", utc_storage_unset_state_changed_cb_n_1, utc_storage_startup, NULL},
{"utc_storage_unset_state_changed_cb_n_2", utc_storage_unset_state_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_p", utc_storage_set_changed_cb_p, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_1", utc_storage_set_changed_cb_n_1, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_2", utc_storage_set_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_3", utc_storage_set_changed_cb_n_3, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_p", utc_storage_unset_changed_cb_p, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_1", utc_storage_unset_changed_cb_n_1, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_2", utc_storage_unset_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_3", utc_storage_unset_changed_cb_n_3, utc_storage_startup, NULL},
{NULL, NULL}
};
extern int utc_storage_unset_state_changed_cb_p(void);
extern int utc_storage_unset_state_changed_cb_n_1(void);
extern int utc_storage_unset_state_changed_cb_n_2(void);
+extern int utc_storage_set_changed_cb_p(void);
+extern int utc_storage_set_changed_cb_n_1(void);
+extern int utc_storage_set_changed_cb_n_2(void);
+extern int utc_storage_set_changed_cb_n_3(void);
+extern int utc_storage_unset_changed_cb_p(void);
+extern int utc_storage_unset_changed_cb_n_1(void);
+extern int utc_storage_unset_changed_cb_n_2(void);
+extern int utc_storage_unset_changed_cb_n_3(void);
testcase tc_array[] = {
{"utc_system_storage_get_internal_memory_size_p", utc_system_storage_get_internal_memory_size_p, NULL, NULL},
{"utc_storage_unset_state_changed_cb_p", utc_storage_unset_state_changed_cb_p, utc_storage_startup, NULL},
{"utc_storage_unset_state_changed_cb_n_1", utc_storage_unset_state_changed_cb_n_1, utc_storage_startup, NULL},
{"utc_storage_unset_state_changed_cb_n_2", utc_storage_unset_state_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_p", utc_storage_set_changed_cb_p, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_1", utc_storage_set_changed_cb_n_1, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_2", utc_storage_set_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_set_changed_cb_n_3", utc_storage_set_changed_cb_n_3, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_p", utc_storage_unset_changed_cb_p, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_1", utc_storage_unset_changed_cb_n_1, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_2", utc_storage_unset_changed_cb_n_2, utc_storage_startup, NULL},
+ {"utc_storage_unset_changed_cb_n_3", utc_storage_unset_changed_cb_n_3, utc_storage_startup, NULL},
{NULL, NULL}
};
assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
return 0;
}
+
+static void test_storage_changed_cb(int storage_id, storage_dev_e dev, storage_state_e state, const char *fstype, const char *fsuuid, const char *mountpath, bool primary, int flags, void *user_data)
+{
+}
+
+/**
+ * @testcase utc_storage_set_changed_cb_p
+ * @since_tizen 3.0
+ * @description Positive test case of storage_set_changed_cb.
+ */
+int utc_storage_set_changed_cb_p(void)
+{
+ int err;
+
+ if (external_storage_id < 0)
+ return 0;
+
+ err= storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, test_storage_changed_cb, NULL);
+ assert_eq(err, STORAGE_ERROR_NONE);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_set_changed_cb_n_1
+ * @since_tizen 3.0
+ * @description Negative test case of storage_set_changed_cb.
+ */
+int utc_storage_set_changed_cb_n_1(void)
+{
+ int err;
+
+ err= storage_set_changed_cb(STORAGE_TYPE_INTERNAL, test_storage_changed_cb, NULL);
+ assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_set_changed_cb_n_2
+ * @since_tizen 3.0
+ * @description Negative test case of storage_set_changed_cb.
+ */
+int utc_storage_set_changed_cb_n_2(void)
+{
+ int err;
+
+ if (external_storage_id < 0)
+ return 0;
+
+ err= storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, NULL, NULL);
+ assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_set_changed_cb_n_3
+ * @since_tizen 3.0
+ * @description Negative test case of storage_set_changed_cb.
+ */
+int utc_storage_set_changed_cb_n_3(void)
+{
+ int err;
+
+ err= storage_set_changed_cb(-1, NULL, NULL);
+ assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_unset_changed_cb_p
+ * @since_tizen 3.0
+ * @description Negative test case of storage_unset_changed_cb.
+ */
+int utc_storage_unset_changed_cb_p(void)
+{
+ int err;
+
+ if (external_storage_id < 0)
+ return 0;
+
+ err= storage_set_changed_cb(STORAGE_TYPE_EXTERNAL, test_storage_changed_cb, NULL);
+ err= storage_unset_changed_cb(STORAGE_TYPE_EXTERNAL, test_storage_changed_cb);
+ assert_eq(err, STORAGE_ERROR_NONE);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_unset_changed_cb_n_1
+ * @since_tizen 3.0
+ * @description Negative test case of storage_unset_changed_cb.
+ */
+int utc_storage_unset_changed_cb_n_1(void)
+{
+ int err;
+
+ err= storage_unset_changed_cb(STORAGE_TYPE_INTERNAL, test_storage_changed_cb);
+ assert_eq(err, STORAGE_ERROR_NOT_SUPPORTED);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_unset_changed_cb_n_2
+ * @since_tizen 3.0
+ * @description Negative test case of storage_unset_changed_cb.
+ */
+int utc_storage_unset_changed_cb_n_2(void)
+{
+ int err;
+
+ if (external_storage_id < 0)
+ return 0;
+
+ err= storage_unset_changed_cb(STORAGE_TYPE_EXTERNAL, NULL);
+ assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+ return 0;
+}
+
+/**
+ * @testcase utc_storage_unset_changed_cb_n_3
+ * @since_tizen 3.0
+ * @description Negative test case of storage_unset_changed_cb.
+ */
+int utc_storage_unset_changed_cb_n_3(void)
+{
+ int err;
+
+ err= storage_unset_changed_cb(-1, NULL);
+ assert_eq(err, STORAGE_ERROR_INVALID_PARAMETER);
+ return 0;
+}
+