--- /dev/null
+#include <check.h>
+#include <Elementary.h>
+#include "../../utc_negative_unitest.h"
+
+Evas_Object *main_win = NULL, *lay = NULL;
+Eina_Bool file_set = EINA_TRUE;
+#define FILE "../layout/layout_example.edj"
+#define GROUP "example/mylayout"
+#define PART_NAME "example/title"
+
+/**
+ * @addtogroup elm_access
+ * @{
+ * @defgroup elm_access_object
+ * elm_access_object_register
+ * elm_access_object_unregister
+ * elm_access_object_get
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ * @step 3 Add a layout to the main window
+ * @step 4 Set edj file to layout
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ elm_init(0, NULL);
+
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ evas_object_show(main_win);
+
+ lay = elm_layout_add(main_win);
+ if (lay == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to add a layout to the main window..", __FILE__, __LINE__);
+ }
+ file_set = elm_layout_file_set(lay, FILE, GROUP);
+ if (file_set == EINA_FALSE)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to set %s as the file that will be used as layout..", __FILE__, __LINE__, FILE);
+ }
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_access_object
+ * @{
+ * @objective The positive Test case check work of functions without errors
+ *
+ * @procedure
+ * @step 1 Gets the evas object from a part of layout
+ * @step 2 Register evas object as an accessible object by call elm_access_object_register()
+ * @step 3 Get an accessible object of the evas object by call elm_access_object_get()
+ * @step 4 Check result
+ * @step 5 Unregister accessible object by call elm_access_object_unregister()
+ * @step 6 Try get an accessible object
+ * @step 7 Check result
+ *
+ * @passcondition : All operations with access object was successful.
+ * @}
+ */
+START_TEST(utc_elm_access_object_p)
+{
+ Evas_Object *obj = NULL;
+ Evas_Object *reg_obj = NULL;
+ Evas_Object *res = NULL;
+
+ obj = (Evas_Object *)edje_object_part_object_get(elm_layout_edje_get(lay), PART_NAME);
+ if (obj == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ reg_obj = elm_access_object_register(obj, lay);
+ if (reg_obj == NULL)
+ {
+ evas_object_del(obj);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ res = elm_access_object_get(obj);
+ if ((res == NULL) || (res != reg_obj))
+ {
+ evas_object_del(obj);
+ evas_object_del(reg_obj);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ elm_access_object_unregister(obj);
+ res = elm_access_object_get(obj);
+ if (res != NULL)
+ {
+ evas_object_del(obj);
+ evas_object_del(reg_obj);
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+Suite *
+test_suite(void)
+{
+ Suite *suite = suite_create("utc_elm_access_object");
+
+ TCase *tcase = tcase_create("TCase");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_access_object_p);
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+int
+main()
+{
+ int number_failed;
+
+ Suite *suite = test_suite();
+ SRunner *srunner = srunner_create(suite);
+ srunner_set_log(srunner, "utc_elm_access_object.log");
+ srunner_set_xml(srunner, "utc_elm_access_object.xml");
+ srunner_run_all(srunner, CK_NORMAL);
+ number_failed = srunner_ntests_failed(srunner);
+ srunner_free(srunner);
+
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}