From 7b2f1bb7ea246474e6c5941632553c1306549f28 Mon Sep 17 00:00:00 2001 From: Kyuho Jo Date: Tue, 21 Aug 2012 18:10:51 +0900 Subject: [PATCH] Removed TC files. --- TC/TC_email_service/Makefile | 33 --- TC/TC_email_service/TC_Account/Makefile | 55 ---- TC/TC_email_service/TC_Account/tslist | 8 - .../uts-email-add-account-with-validation.c | 137 ---------- .../uts-email-add-account-with-validation.h | 29 --- .../TC_Account/uts-email-add-account.c | 147 ----------- .../TC_Account/uts-email-add-account.h | 35 --- .../TC_Account/uts-email-delete-account.c | 121 --------- .../TC_Account/uts-email-delete-account.h | 36 --- .../TC_Account/uts-email-free-account.c | 149 ----------- .../TC_Account/uts-email-free-account.h | 35 --- .../TC_Account/uts-email-get-account-list-refer.h | 36 --- .../TC_Account/uts-email-get-account-list.c | 128 ---------- .../TC_Account/uts-email-get-account-list.h | 36 --- .../TC_Account/uts-email-get-account-refer.h | 36 --- .../TC_Account/uts-email-get-account.c | 142 ----------- .../TC_Account/uts-email-get-account.h | 36 --- .../TC_Account/uts-email-update-account.c | 154 ----------- .../TC_Account/uts-email-update-account.h | 36 --- .../TC_Account/uts-email-validate-account.c | 155 ----------- .../TC_Account/uts-email-validate-account.h | 35 --- TC/TC_email_service/TC_Folder/Makefile | 51 ---- TC/TC_email_service/TC_Folder/tslist | 5 - .../TC_Folder/uts-email-add-mailbox.c | 161 ------------ .../TC_Folder/uts-email-add-mailbox.h | 31 --- .../TC_Folder/uts-email-delete-mailbox.c | 138 ---------- .../TC_Folder/uts-email-delete-mailbox.h | 31 --- .../uts-email-get-mailbox-by-mailboxtype.c | 148 ----------- .../uts-email-get-mailbox-by-mailboxtype.h | 32 --- .../TC_Folder/uts-email-get-mailbox-by-name.c | 171 ------------- .../TC_Folder/uts-email-get-mailbox-by-name.h | 33 --- .../TC_Folder/uts-email-get-mailbox-list.c | 200 --------------- .../TC_Folder/uts-email-get-mailbox-list.h | 34 --- .../TC_Folder/uts-email-get-sub-mailbox-list.c | 205 --------------- .../TC_Folder/uts-email-get-sub-mailbox-list.h | 34 --- TC/TC_email_service/TC_Init/Makefile | 52 ---- TC/TC_email_service/TC_Init/tslist | 6 - TC/TC_email_service/TC_Init/uts-email-close-db.c | 63 ----- TC/TC_email_service/TC_Init/uts-email-close-db.h | 32 --- .../TC_Init/uts-email-init-storage.c | 72 ------ .../TC_Init/uts-email-init-storage.h | 33 --- TC/TC_email_service/TC_Init/uts-email-open-db.c | 64 ----- TC/TC_email_service/TC_Init/uts-email-open-db.h | 33 --- .../TC_Init/uts-email-ping-service.c | 68 ----- .../TC_Init/uts-email-ping-service.h | 32 --- .../TC_Init/uts-email-service-begin.c | 63 ----- .../TC_Init/uts-email-service-begin.h | 33 --- .../TC_Init/uts-email-service-end.c | 66 ----- .../TC_Init/uts-email-service-end.h | 32 --- TC/TC_email_service/TC_Message/Makefile | 89 ------- TC/TC_email_service/TC_Message/tslist | 22 -- .../TC_Message/uts-email-add-attachment.c | 278 -------------------- .../TC_Message/uts-email-add-attachment.h | 35 --- .../TC_Message/uts-email-add-message.c | 211 --------------- .../TC_Message/uts-email-add-message.h | 38 --- .../TC_Message/uts-email-cancel-send-mail.c | 121 --------- .../TC_Message/uts-email-cancel-send-mail.h | 36 --- .../TC_Message/uts-email-clear-mail-data.c | 90 ------- .../TC_Message/uts-email-clear-mail-data.h | 36 --- .../uts-email-count-message-all-mailboxes.c | 219 ---------------- .../uts-email-count-message-all-mailboxes.h | 38 --- .../uts-email-count-message-on-sending.c | 198 --------------- .../uts-email-count-message-on-sending.h | 37 --- .../uts-email-count-message-with-draft-flag.c | 198 --------------- .../uts-email-count-message-with-draft-flag.h | 37 --- .../TC_Message/uts-email-count-message.c | 228 ----------------- .../TC_Message/uts-email-count-message.h | 38 --- .../TC_Message/uts-email-create-db-full.c | 137 ---------- .../TC_Message/uts-email-create-db-full.h | 36 --- .../uts-email-delete-all-message-in-folder.c | 180 ------------- .../uts-email-delete-all-message-in-folder.h | 36 --- .../TC_Message/uts-email-delete-attachment.c | 180 ------------- .../TC_Message/uts-email-delete-attachment.h | 36 --- .../TC_Message/uts-email-delete-message.c | 237 ----------------- .../TC_Message/uts-email-delete-message.h | 38 --- .../TC_Message/uts-email-free-attachment-info.c | 187 -------------- .../TC_Message/uts-email-free-attachment-info.h | 37 --- .../TC_Message/uts-email-free-body-info.c | 215 ---------------- .../TC_Message/uts-email-free-body-info.h | 36 --- .../TC_Message/uts-email-free-header-info.c | 206 --------------- .../TC_Message/uts-email-free-header-info.h | 36 --- .../TC_Message/uts-email-free-mail-info.c | 197 -------------- .../TC_Message/uts-email-free-mail-info.h | 36 --- .../TC_Message/uts-email-free-mail-list.c | 161 ------------ .../TC_Message/uts-email-free-mail-list.h | 35 --- .../TC_Message/uts-email-free-mail.c | 182 ------------- .../TC_Message/uts-email-free-mail.h | 36 --- .../TC_Message/uts-email-free-mailbox.c | 168 ------------ .../TC_Message/uts-email-free-mailbox.h | 36 --- .../TC_Message/uts-email-free-sender-list.c | 180 ------------- .../TC_Message/uts-email-free-sender-list.h | 36 --- .../TC_Message/uts-email-get-attachment-info.c | 205 --------------- .../TC_Message/uts-email-get-attachment-info.h | 38 --- .../TC_Message/uts-email-get-body-info.c | 282 --------------------- .../TC_Message/uts-email-get-body-info.h | 38 --- .../TC_Message/uts-email-get-disk-space-usage.c | 104 -------- .../TC_Message/uts-email-get-disk-space-usage.h | 36 --- .../TC_Message/uts-email-get-header-info.c | 256 ------------------- .../TC_Message/uts-email-get-header-info.h | 38 --- .../TC_Message/uts-email-get-info.c | 209 --------------- .../TC_Message/uts-email-get-info.h | 37 --- .../uts-email-get-latest-unread-mail-id.c | 180 ------------- .../uts-email-get-latest-unread-mail-id.h | 37 --- .../TC_Message/uts-email-get-mail-flag.c | 242 ------------------ .../TC_Message/uts-email-get-mail-flag.h | 38 --- .../TC_Message/uts-email-get-mail-list-ex.c | 215 ---------------- .../TC_Message/uts-email-get-mail-list-ex.h | 38 --- .../TC_Message/uts-email-get-mail-list.h | 37 --- .../TC_Message/uts-email-get-mail.c | 180 ------------- .../TC_Message/uts-email-get-mail.h | 36 --- .../TC_Message/uts-email-get-mailbox-list.c | 235 ----------------- .../TC_Message/uts-email-get-mailbox-list.h | 38 --- .../uts-email-get-mailbox-name-by-mail-id.c | 210 --------------- .../uts-email-get-mailbox-name-by-mail-id.h | 37 --- .../TC_Message/uts-email-get-max-mail-count.c | 102 -------- .../TC_Message/uts-email-get-max-mail-count.h | 36 --- .../TC_Message/uts-email-get-sender-list.c | 215 ---------------- .../TC_Message/uts-email-get-sender-list.h | 38 --- .../TC_Message/uts-email-get-thread-information.h | 35 --- .../TC_Message/uts-email-modify-extra-mail-flag.c | 176 ------------- .../TC_Message/uts-email-modify-extra-mail-flag.h | 35 --- .../TC_Message/uts-email-modify-mail-flag.c | 202 --------------- .../TC_Message/uts-email-modify-mail-flag.h | 35 --- .../TC_Message/uts-email-modify-seen-flag.h | 38 --- .../TC_Message/uts-email-modify-seen_flag.c | 268 -------------------- .../uts-email-move-all-mails-to-folder.c | 249 ------------------ .../uts-email-move-all-mails-to-folder.h | 37 --- .../TC_Message/uts-email-move-mail-to-folder.c | 264 ------------------- .../TC_Message/uts-email-move-mail-to-folder.h | 38 --- .../TC_Message/uts-email-release-mail.c | 111 -------- .../TC_Message/uts-email-release-mail.h | 35 --- .../TC_Message/uts-email-send-retry.c | 119 --------- .../TC_Message/uts-email-send-retry.h | 36 --- .../TC_Message/uts-email-update-message.c | 199 --------------- .../TC_Message/uts-email-update-message.h | 36 --- TC/TC_email_service/TC_Network/Makefile | 57 ----- TC/TC_email_service/TC_Network/tslist | 10 - .../TC_Network/uts_email_activate_pdp.c | 144 ----------- .../TC_Network/uts_email_activate_pdp.h | 34 --- .../TC_Network/uts_email_cancel_job.c | 144 ----------- .../TC_Network/uts_email_cancel_job.h | 34 --- .../TC_Network/uts_email_deactivate_pdp.c | 128 ---------- .../TC_Network/uts_email_deactivate_pdp.h | 34 --- .../TC_Network/uts_email_download_attachment.c | 190 -------------- .../TC_Network/uts_email_download_attachment.h | 35 --- .../TC_Network/uts_email_download_body.c | 217 ---------------- .../TC_Network/uts_email_download_body.h | 35 --- .../TC_Network/uts_email_get_imap_folder_list.c | 152 ----------- .../TC_Network/uts_email_get_imap_folder_list.h | 33 --- .../TC_Network/uts_email_get_network_status.c | 108 -------- .../TC_Network/uts_email_get_network_status.h | 31 --- .../TC_Network/uts_email_get_pending_job.c | 169 ------------ .../TC_Network/uts_email_get_pending_job.h | 35 --- .../TC_Network/uts_email_send_mail.c | 219 ---------------- .../TC_Network/uts_email_send_mail.h | 35 --- .../TC_Network/uts_email_send_report.c | 197 -------------- .../TC_Network/uts_email_send_report.h | 33 --- .../TC_Network/uts_email_send_saved.c | 184 -------------- .../TC_Network/uts_email_send_saved.h | 35 --- .../TC_Network/uts_email_sync_header.c | 186 -------------- .../TC_Network/uts_email_sync_header.h | 35 --- .../uts_email_sync_header_for_all_account.c | 105 -------- .../uts_email_sync_header_for_all_account.h | 33 --- .../TC_Network/uts_email_sync_local_activity.c | 143 ----------- .../TC_Network/uts_email_sync_local_activity.h | 34 --- TC/TC_email_service/TC_Rule/Makefile | 52 ---- TC/TC_email_service/TC_Rule/tslist | 6 - TC/TC_email_service/TC_Rule/uts-email-add-rule.c | 141 ----------- TC/TC_email_service/TC_Rule/uts-email-add-rule.h | 30 --- .../TC_Rule/uts-email-delete-rule.c | 191 -------------- .../TC_Rule/uts-email-delete-rule.h | 30 --- TC/TC_email_service/TC_Rule/uts-email-free-rule.c | 112 -------- TC/TC_email_service/TC_Rule/uts-email-free-rule.h | 29 --- .../TC_Rule/uts-email-get-rule-list.c | 178 ------------- .../TC_Rule/uts-email-get-rule-list.h | 31 --- TC/TC_email_service/TC_Rule/uts-email-get-rule.c | 169 ------------ TC/TC_email_service/TC_Rule/uts-email-get-rule.h | 31 --- .../TC_Rule/uts-email-update-rule.c | 195 -------------- .../TC_Rule/uts-email-update-rule.h | 31 --- .../TC_Utility/uts-email-dummy-utility.c | 169 ------------ .../TC_Utility/uts-email-dummy-utility.h | 33 --- .../TC_Utility/uts-email-real-utility.c | 221 ---------------- .../TC_Utility/uts-email-real-utility.h | 33 --- TC/TC_email_service/_export_env.sh | 19 -- TC/_export_target_env.sh | 17 -- TC/build.sh | 20 -- TC/execute.sh | 17 -- TC/making_new_tet_scen.py | 70 ----- TC/tet_scen | 61 ----- TC/tetbuild.cfg | 25 -- TC/tetclean.cfg | 12 - TC/tetexec.cfg | 16 -- TC/tslist.txt | 6 - 193 files changed, 17959 deletions(-) delete mode 100755 TC/TC_email_service/Makefile delete mode 100755 TC/TC_email_service/TC_Account/Makefile delete mode 100755 TC/TC_email_service/TC_Account/tslist delete mode 100755 TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-add-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-add-account.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-delete-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-delete-account.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-free-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-free-account.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account-list-refer.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account-list.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account-list.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account-refer.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-get-account.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-update-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-update-account.h delete mode 100755 TC/TC_email_service/TC_Account/uts-email-validate-account.c delete mode 100755 TC/TC_email_service/TC_Account/uts-email-validate-account.h delete mode 100755 TC/TC_email_service/TC_Folder/Makefile delete mode 100755 TC/TC_email_service/TC_Folder/tslist delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-add-mailbox.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-add-mailbox.h delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.h delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.h delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.h delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.h delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.c delete mode 100755 TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.h delete mode 100755 TC/TC_email_service/TC_Init/Makefile delete mode 100755 TC/TC_email_service/TC_Init/tslist delete mode 100755 TC/TC_email_service/TC_Init/uts-email-close-db.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-close-db.h delete mode 100755 TC/TC_email_service/TC_Init/uts-email-init-storage.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-init-storage.h delete mode 100755 TC/TC_email_service/TC_Init/uts-email-open-db.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-open-db.h delete mode 100755 TC/TC_email_service/TC_Init/uts-email-ping-service.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-ping-service.h delete mode 100755 TC/TC_email_service/TC_Init/uts-email-service-begin.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-service-begin.h delete mode 100755 TC/TC_email_service/TC_Init/uts-email-service-end.c delete mode 100755 TC/TC_email_service/TC_Init/uts-email-service-end.h delete mode 100644 TC/TC_email_service/TC_Message/Makefile delete mode 100755 TC/TC_email_service/TC_Message/tslist delete mode 100755 TC/TC_email_service/TC_Message/uts-email-add-attachment.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-add-attachment.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-add-message.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-add-message.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-clear-mail-data.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-clear-mail-data.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-count-message.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-create-db-full.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-create-db-full.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-attachment.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-attachment.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-message.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-delete-message.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-attachment-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-attachment-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-body-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-body-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-header-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-header-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail-list.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail-list.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mail.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mailbox.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-mailbox.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-sender-list.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-free-sender-list.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-attachment-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-attachment-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-body-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-body-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-header-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-header-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-info.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-info.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail-flag.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail-flag.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail-list.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mail.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-sender-list.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-sender-list.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-get-thread-information.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-seen-flag.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-modify-seen_flag.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-release-mail.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-release-mail.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-send-retry.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-send-retry.h delete mode 100755 TC/TC_email_service/TC_Message/uts-email-update-message.c delete mode 100755 TC/TC_email_service/TC_Message/uts-email-update-message.h delete mode 100755 TC/TC_email_service/TC_Network/Makefile delete mode 100755 TC/TC_email_service/TC_Network/tslist delete mode 100755 TC/TC_email_service/TC_Network/uts_email_activate_pdp.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_activate_pdp.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_cancel_job.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_cancel_job.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_download_attachment.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_download_attachment.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_download_body.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_download_body.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_network_status.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_network_status.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_pending_job.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_get_pending_job.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_mail.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_mail.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_report.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_report.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_saved.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_send_saved.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_header.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_header.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.h delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_local_activity.c delete mode 100755 TC/TC_email_service/TC_Network/uts_email_sync_local_activity.h delete mode 100755 TC/TC_email_service/TC_Rule/Makefile delete mode 100755 TC/TC_email_service/TC_Rule/tslist delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-add-rule.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-add-rule.h delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-delete-rule.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-delete-rule.h delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-free-rule.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-free-rule.h delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-get-rule-list.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-get-rule-list.h delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-get-rule.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-get-rule.h delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-update-rule.c delete mode 100755 TC/TC_email_service/TC_Rule/uts-email-update-rule.h delete mode 100755 TC/TC_email_service/TC_Utility/uts-email-dummy-utility.c delete mode 100755 TC/TC_email_service/TC_Utility/uts-email-dummy-utility.h delete mode 100755 TC/TC_email_service/TC_Utility/uts-email-real-utility.c delete mode 100755 TC/TC_email_service/TC_Utility/uts-email-real-utility.h delete mode 100755 TC/TC_email_service/_export_env.sh delete mode 100755 TC/_export_target_env.sh delete mode 100755 TC/build.sh delete mode 100755 TC/execute.sh delete mode 100755 TC/making_new_tet_scen.py delete mode 100644 TC/tet_scen delete mode 100755 TC/tetbuild.cfg delete mode 100755 TC/tetclean.cfg delete mode 100755 TC/tetexec.cfg delete mode 100755 TC/tslist.txt diff --git a/TC/TC_email_service/Makefile b/TC/TC_email_service/Makefile deleted file mode 100755 index ddb5074..0000000 --- a/TC/TC_email_service/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -testbuildtype=normal -#export testbuildtype - -all: TCInit TCAccount TCFolder TCRule TCNetwork TCMessage - echo done - -TCInit: - make -s -C TC_Init - -TCAccount: - make -s -C TC_Account - - -TCFolder: - make -s -C TC_Folder - -TCRule: - make -s -C TC_Rule - -TCNetwork: - make -s -C TC_Network - -TCMessage: - make -s -C TC_Message - -clean: - make clean -C TC_Init - make clean -C TC_Account - make clean -C TC_Folder - make clean -C TC_Rule - make clean -C TC_Network - make clean -C TC_Message - diff --git a/TC/TC_email_service/TC_Account/Makefile b/TC/TC_email_service/TC_Account/Makefile deleted file mode 100755 index 557a5ee..0000000 --- a/TC/TC_email_service/TC_Account/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts-email-add-account \ - uts-email-add-account-with-validation \ - uts-email-free-account \ - uts-email-get-account \ - uts-email-get-account-list \ - uts-email-update-account \ - uts-email-validate-account \ - uts-email-delete-account -# uts-email-get-account-list-refer \ - uts-email-get-account-refer -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = -I. `pkg-config --cflags $(PKGS)` -INCS += -I. `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_email_service/TC_Utility - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Account/tslist b/TC/TC_email_service/TC_Account/tslist deleted file mode 100755 index 3f2b3ed..0000000 --- a/TC/TC_email_service/TC_Account/tslist +++ /dev/null @@ -1,8 +0,0 @@ -uts-email-add-account -uts-email-validate-account -uts-email-update-account -uts-email-add-account-with-validation -uts-email-get-account -uts-email-get-account-list -uts-email-free-account -uts-email-delete-account diff --git a/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.c b/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.c deleted file mode 100755 index 72ed33b..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.c +++ /dev/null @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -#include "uts-email-add-account-with-validation.h" - -sqlite3 *sqlite_emmb; - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - -/*Testcase : uts_Email_Add_Account_With_Validation_01 - TestObjective : To add and validate an email account - APIs Tested : int email_add_account_with_validation(email_account_t *account, unsigned *handle) - */ - -static void uts_Email_Add_Account_With_Validation_01() -{ - email_account_t *account = NULL; - int handle; - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Add_Account_With_Validation_01 Begin\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account, 0x00, sizeof(email_account_t)); - - account->account_name = strdup("GmailImap"); - account->user_display_name = strdup("samsungtest"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_IMAP4; - account->incoming_server_address= strdup("imap.gmail.com"); - account->incoming_server_port_number = 993; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("Samsung Test 09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address = strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.block_subject = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account_with_validation(account, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email add account_with_validation success : accountID[%d]\n", account->account_id); - tet_result(TET_PASS); - } - else { - tet_printf("Email add account_with_validation failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_account(&account, 1); - } -} - -/*Testcase : uts_Email_Add_Account_With_Validation_02 - TestObjective : To validate parameter for account in add an email account with validation - APIs Tested : int email_add_account_with_validation(email_account_t *account, unsigned *handle) - */ - -static void uts_Email_Add_Account_With_Validation_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL ; - int handle; - - tet_infoline("uts_Email_Add_Account_With_Validation_02 : Begin\n"); - - err_code = email_add_account_with_validation(pAccount, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email add account with validation success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add account with validation failed\n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.h b/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.h deleted file mode 100755 index f64450f..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-add-account-with-validation.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Account_With_Validation_01(void); -static void uts_Email_Add_Account_With_Validation_02(void); - -struct tet_testlist tet_testlist[] = { - { uts_Email_Add_Account_With_Validation_01, 1}, { uts_Email_Add_Account_With_Validation_02, 2}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-add-account.c b/TC/TC_email_service/TC_Account/uts-email-add-account.c deleted file mode 100755 index 5f0f218..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-add-account.c +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-add-account.h" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Add_Account_01 - TestObjective : To add an email account - APIs Tested : int email_add_account(email_account_t *account) - */ - -static void uts_Email_Add_Account_01() -{ - email_account_t *account = NULL; - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Add_Account_01 Begin\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account , 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail POP"); - account->user_display_name = strdup("samsungtest09"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_POP3; - account->incoming_server_address= strdup("pop.gmail.com"); - account->incoming_server_port_number = 995; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address = strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.block_subject = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account(account); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email add account success : accountID[%d]\n", account->account_id); - tet_result(TET_PASS); - g_accountId = account->account_id; - } - else { - - tet_printf("Email add account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_account(&account, 1); - - } - -} - - -/*Testcase : uts_Email_Add_Account_02 - TestObjective : To validate parameter for add an email account - APIs Tested : int email_add_account(email_account_t *account) - */ -static void uts_Email_Add_Account_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Add_Account_02 : Begin\n"); - - err_code = email_add_account(pAccount); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email add account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add account failed\n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Account/uts-email-add-account.h b/TC/TC_email_service/TC_Account/uts-email-add-account.h deleted file mode 100755 index 4741c45..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-add-account.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Account_01(void); -static void uts_Email_Add_Account_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Add_Account_01, 1}, { uts_Email_Add_Account_02, 2}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-delete-account.c b/TC/TC_email_service/TC_Account/uts-email-delete-account.c deleted file mode 100755 index 9f7e687..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-delete-account.c +++ /dev/null @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-delete-account.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Delete_Account_01 - TestObjective : To delete an email account - APIs Tested : int email_delete_account(int account_id) - */ - -static void uts_Email_Delete_Account_01() -{ - int err_code = EMAIL_ERROR_NONE; - int account_id = 0; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Delete_Account_01 : Begin\n"); - account_id = g_accountId; - - - err_code = email_delete_account(account_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email delete account : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Delete_Account_02 - TestObjective : To validate parameter for delete an email account - APIs Tested : int email_delete_account(int account_id) - */ - -static void uts_Email_Delete_Account_02() -{ - int err_code = EMAIL_ERROR_NONE; - int account_id = -1; - - tet_infoline("uts_Email_Delete_Account_02 : Begin\n"); - - err_code = email_delete_account(account_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete account failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Account/uts-email-delete-account.h b/TC/TC_email_service/TC_Account/uts-email-delete-account.h deleted file mode 100755 index 6554338..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-delete-account.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "../TC_Utility/uts-email-dummy-utility.h" -/* #include "uts-email-dummy-utility.h */ - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_Account_01(void); -static void uts_Email_Delete_Account_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Delete_Account_01, 1}, { uts_Email_Delete_Account_02, 2}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-free-account.c b/TC/TC_email_service/TC_Account/uts-email-free-account.c deleted file mode 100755 index 01d198f..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-free-account.c +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-account.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - - -/*Testcase : uts_Email_Free_Account_01 - TestObjective : To free an email account - APIs Tested : int email_free_account(email_account_t **account_list, int count) - */ - -static void uts_Email_Free_Account_01() -{ - email_account_t *account = NULL; - int handle; - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Free_Account_01 Begin\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account, 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail Account"); - account->user_display_name = strdup("samsungtest"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_POP3; - account->incoming_server_address= strdup("pop.gmail.com"); - account->incoming_server_port_number = 995; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address= strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.block_subject = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account(account); - if (EMAIL_ERROR_NONE == err_code) - tet_printf("Email add account success : accountID[%d]\n", account->account_id); - else - tet_printf("Email add account_with_validation failed : error_code[%d]\n", err_code); - err_code = email_free_account(&account, 1); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email free account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free account : Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } -} - -/*Testcase : uts_Email_Free_Account_02 - TestObjective : To validate parameter for account_list in add free email account - APIs Tested : int email_free_account(email_account_t **account_list, int count) - */ - -static void uts_Email_Free_Account_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Free_Account_02 : Begin\n"); - - err_code = email_free_account(NULL, 1); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email free account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free account failed\n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Account/uts-email-free-account.h b/TC/TC_email_service/TC_Account/uts-email-free-account.h deleted file mode 100755 index 25b1d5b..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-free-account.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Account_01(void); -static void uts_Email_Free_Account_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Account_01, 1}, { uts_Email_Free_Account_02, 2}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account-list-refer.h b/TC/TC_email_service/TC_Account/uts-email-get-account-list-refer.h deleted file mode 100755 index 0a7204d..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account-list-refer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Account_List_Refer_01(void); -static void uts_Email_Get_Account_List_Refer_02(void); -static void uts_Email_Get_Account_List_Refer_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Account_List_Refer_01, 1}, { uts_Email_Get_Account_List_Refer_02, 2}, { uts_Email_Get_Account_List_Refer_03, 3}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account-list.c b/TC/TC_email_service/TC_Account/uts-email-get-account-list.c deleted file mode 100755 index ac604ec..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account-list.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-account-list.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Account_List_01 - TestObjective : To get account list - APIs Tested : int email_get_account_list(email_account_t **account, int *count) - */ - -static void uts_Email_Get_Account_List_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Get_Account_List_01 : Begin\n"); - - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - for (i ; i < count;i++) - tet_printf("account_id[%d] account_name[%s] email_addr[%s]\n", - pAccount[i].account_id, pAccount[i].account_name, pAccount[i].user_email_address); - - tet_result(TET_PASS); - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Account_List_02 - TestObjective : To validate parameter for account_list in get account list - APIs Tested : int email_get_account_list(email_account_t **account_list, int *count) - */ - -static void uts_Email_Get_Account_List_02() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - - tet_infoline("uts_Email_Get_Account_List_02 : Begin\n"); - - err_code = email_get_account_list(NULL, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get account list success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get account list failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Account_List_03 - TestObjective : To validate parameter for count in get account list - APIs Tested : int email_get_account_list(email_account_t **account, int *count) - */ - -static void uts_Email_Get_Account_List_03() -{ - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Get_Account_List_03 : Begin\n"); - - err_code = email_get_account_list(&pAccount, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get account list success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get account list failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account-list.h b/TC/TC_email_service/TC_Account/uts-email-get-account-list.h deleted file mode 100755 index ac88cfc..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account-list.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Account_List_01(void); -static void uts_Email_Get_Account_List_02(void); -static void uts_Email_Get_Account_List_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Account_List_01, 1}, { uts_Email_Get_Account_List_02, 2}, { uts_Email_Get_Account_List_03, 3}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account-refer.h b/TC/TC_email_service/TC_Account/uts-email-get-account-refer.h deleted file mode 100755 index 0683a25..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account-refer.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Account_Refer_01(void); -static void uts_Email_Get_Account_Refer_02(void); -static void uts_Email_Get_Account_Refer_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Account_Refer_01, 1}, { uts_Email_Get_Account_Refer_02, 2}, { uts_Email_Get_Account_Refer_03, 3}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account.c b/TC/TC_email_service/TC_Account/uts-email-get-account.c deleted file mode 100755 index 64d6169..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account.c +++ /dev/null @@ -1,142 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-account.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Account_01 - TestObjective : To get account information based on account id - APIs Tested : int email_get_account(int account_id, int pulloption, email_account_t **account) - */ - -static void uts_Email_Get_Account_01() -{ - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Account_01 : Begin\n"); - - err_code = email_get_account(g_accountId, GET_FULL_DATA, &pAccount); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account success\n"); - tet_printf("account_name[%s]\n email_addr[%s]\n", pAccount->account_name, pAccount->user_email_address); - tet_result(TET_PASS); - } - else { - tet_printf("Email get account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - -/*Testcase : uts_Email_Get_Account_02 - TestObjective : To validate parameter for account_id in get account information based on account id - APIs Tested : int email_get_account(int account_id, int pulloption, email_account_t **account) - */ - -static void uts_Email_Get_Account_02() -{ - int err_code = EMAIL_ERROR_NONE; - int account_id = -1; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Get_Account_02 : Begin\n"); - - err_code = email_get_account(account_id, GET_FULL_DATA, &pAccount); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get account failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Account_03 - TestObjective : To validate parameter for account in get account information based on account id - APIs Tested : int email_get_account(int account_id, int pulloption, email_account_t **account) - */ - -static void uts_Email_Get_Account_03() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Get_Account_03 : Begin\n"); - - err_code = email_get_account(g_accountId, GET_FULL_DATA, NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get account failed : \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Account/uts-email-get-account.h b/TC/TC_email_service/TC_Account/uts-email-get-account.h deleted file mode 100755 index 6e43465..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-get-account.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Account_01(void); -static void uts_Email_Get_Account_02(void); -static void uts_Email_Get_Account_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Account_01, 1}, { uts_Email_Get_Account_02, 2}, { uts_Email_Get_Account_03, 3}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-update-account.c b/TC/TC_email_service/TC_Account/uts-email-update-account.c deleted file mode 100755 index d9bc6f7..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-update-account.c +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-update-account.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id ; - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Update_Account_01 - TestObjective : To update account information of an email account - APIs Tested : int email_update_account(int account_id, email_account_t *new_account) - */ - -static void uts_Email_Update_Account_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_account_t *pNewAccount = NULL ; - - tet_infoline("uts_Email_Update_Account_01 : Begin\n"); - - err_code = email_get_account(g_accountId, GET_FULL_DATA, &pNewAccount); - tet_printf("account_id[%d] account_name[%s] email_addr[%s]\n", - pNewAccount[i].account_id, pNewAccount[i].account_name, pNewAccount[i].user_email_address); - - pNewAccount[i].account_name = strdup("Test_Tc"); - pNewAccount[i].user_email_address = strdup("Test@gmail.com"); - - err_code = email_update_account(pNewAccount->account_id , pNewAccount); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email update account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email update account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - -/*Testcase : uts_Email_Update_Account_02 - TestObjective : To validate update account parameter. - APIs tested : Tint email_update_account(int account_id, email_account_t *new_account); - */ - -static void uts_Email_Update_Account_02() -{ - int account_id; - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL; - - tet_infoline("uts_Email_Account_02 : Begin\n"); - account_id = -1; - - pAccount = (email_account_t *) malloc(sizeof(email_account_t)); - memset(pAccount, 0x00, sizeof(email_account_t)); - - pAccount->account_name = strdup("UpdateTest"); - - err_code = email_update_account(account_id, pAccount); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf(" email Update Account Falied : \n"); - tet_result (TET_FAIL); - } - else { - tet_printf ("email Update Account successful \n"); - tet_result (TET_PASS); - } - } - - - -/*Testcase : uts_Email_Update_Account_03 - TestObjective : To validate update account parameter. - APIs tested : Tint email_update_account(int account_id, email_account_t *new_account); - */ - -static void uts_Email_Update_Account_03() -{ - int account_id = 1; - int err_code = EMAIL_ERROR_NONE; - email_account_t *pAccount = NULL; - - tet_infoline("utc_Email_Account_14 : Begin\n"); - - err_code = email_update_account(account_id, pAccount); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf(" email Update Account : Falied\n"); - tet_result (TET_FAIL); - } - else { - tet_printf ("email Update Account : successful \n"); - tet_result (TET_PASS); - } - } - diff --git a/TC/TC_email_service/TC_Account/uts-email-update-account.h b/TC/TC_email_service/TC_Account/uts-email-update-account.h deleted file mode 100755 index ca081ab..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-update-account.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Update_Account_01(void); -static void uts_Email_Update_Account_02(void); -static void uts_Email_Update_Account_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Update_Account_01, 1}, { uts_Email_Update_Account_02, 2}, { uts_Email_Update_Account_03, 3}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Account/uts-email-validate-account.c b/TC/TC_email_service/TC_Account/uts-email-validate-account.c deleted file mode 100755 index ba4c1a3..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-validate-account.c +++ /dev/null @@ -1,155 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-validate-account.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Validate_Account_01 - TestObjective : To validate an email account - APIs Tested : int email_validate_account(int account_id, unsigned *handle) - */ - -static void uts_Email_Validate_Account_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_account_t *account = NULL; - - tet_infoline("uts_Email_Validate_Account_01 : Begin\n"); - - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account , 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail1 POP"); - account->user_display_name = strdup("samsung"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_POP3; - account->incoming_server_address= strdup("pop.gmail.com"); - account->incoming_server_port_number = 995; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address= strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.block_subject = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account(account); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email add account success : accountID[%d]\n", account->account_id); - err_code = email_validate_account(account->account_id, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email validate account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email validate account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - - tet_printf("Email add account failed : err_code[%d]n", err_code); - tet_result(TET_UNRESOLVED); - } - email_free_account(&account, 1); - } - -} - -/*Testcase : uts_Email_Validate_Account_02 - TestObjective : To validate paramete for account_id in validate an email account - APIs Tested : int email_validate_account(int account_id, unsigned *handle) - */ - -static void uts_Email_Validate_Account_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int account_id = -1; - - tet_infoline("uts_Email_Validate_Account_05 : Begin\n"); - - err_code = email_validate_account(account_id, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email validate account success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email validate account failed : \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Account/uts-email-validate-account.h b/TC/TC_email_service/TC_Account/uts-email-validate-account.h deleted file mode 100755 index d43014c..0000000 --- a/TC/TC_email_service/TC_Account/uts-email-validate-account.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Validate_Account_01(void); -static void uts_Email_Validate_Account_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Validate_Account_01, 1}, { uts_Email_Validate_Account_02, 2}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Folder/Makefile b/TC/TC_email_service/TC_Folder/Makefile deleted file mode 100755 index a35443e..0000000 --- a/TC/TC_email_service/TC_Folder/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts-email-add-mailbox \ - uts-email-get-mailbox-list \ - uts-email-get-mailbox-by-mailboxtype \ - uts-email-delete-mailbox - -# uts-email-get-sync-mailbox-list (deprecated function) -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = -I. `pkg-config --cflags $(PKGS)` -INCS += -I. `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_email_service/TC_Utility - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Folder/tslist b/TC/TC_email_service/TC_Folder/tslist deleted file mode 100755 index f16ff20..0000000 --- a/TC/TC_email_service/TC_Folder/tslist +++ /dev/null @@ -1,5 +0,0 @@ -uts-email-add-mailbox -uts-email-get-mailbox-list -uts-email-get-mailbox-by-mailboxtype -uts-email-delete-mailbox - diff --git a/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.c b/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.c deleted file mode 100755 index fa7308f..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.c +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-add-mailbox.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Add_Mailbox_01 - TestObjective : To add a new mailbox to an account only localy - APIs Tested : int email_add_mailbox(email_mailbox_t *new_mailbox, int on_server, unsigned *handle) - */ - -static void uts_Email_Add_Mailbox_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t mbox; - int local_yn = 1; - int handle; - - tet_infoline("uts_Email_Add_Mailbox_01 Begin\n"); - - memset(&mbox , 0x00, sizeof(email_mailbox_t)); - mbox.mailbox_name = strdup("Test"); - mbox.alias = strdup("Test"); - mbox.local = local_yn; - mbox.mailbox_type = 7; - mbox.account_id = g_accountId; - err_code = email_add_mailbox(&mbox , 0, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email add mailbox Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Add_Mailbox_02 - TestObjective : To add a new mailbox to an account on server as well as in local also - APIs Tested : int email_add_mailbox(email_mailbox_t *new_mailbox, int on_server, unsigned *handle) - */ - -static void uts_Email_Add_Mailbox_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t mbox; - int local_yn = 0; - int handle; - - tet_infoline("uts_Email_Add_Mailbox_02 Begin\n"); - - memset(&mbox , 0x00, sizeof(email_mailbox_t)); - mbox.mailbox_name = strdup("Test"); - mbox.alias = strdup("Test"); - mbox.local = local_yn; - mbox.mailbox_type = 7; - - mbox.account_id = g_accountId; - err_code = email_add_mailbox(&mbox , 1, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email add mailbox on server and in local : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Add_Mailbox_03 - TestObjective : To validate parameter for add a new mailbox - APIs Tested : int email_add_mailbox(email_mailbox_t *new_mailbox, int on_server, unsigned *handle) - */ - -static void uts_Email_Add_Mailbox_03() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *mbox = NULL; - int local_yn = 0; - int handle; - int count = 0; - - tet_infoline("uts_Email_Add_Mailbox_03 Begin\n"); - - err_code = email_add_mailbox(mbox , 1, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add mailbox validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add mailbox failed validate parameter\n"); - tet_result(TET_FAIL); - } - -} - - diff --git a/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.h b/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.h deleted file mode 100755 index 408bea0..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-add-mailbox.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Mailbox_01(void); -static void uts_Email_Add_Mailbox_02(void); -static void uts_Email_Add_Mailbox_03(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Add_Mailbox_01, 1}, {uts_Email_Add_Mailbox_02, 2}, {uts_Email_Add_Mailbox_03, 3}, {NULL, 0}}; diff --git a/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.c b/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.c deleted file mode 100755 index 4d5f37e..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "email-api-account.h" -#include "uts-email-delete-mailbox.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - int err_code = EMAIL_ERROR_NONE; - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Delete_Mailbox_01 - TestObjective : To delete mailbox - APIs Tested : int email_delete_mailbox(int input_mailbox_id, int input_on_server, unsigned* output_handle) - */ - -static void uts_Email_Delete_Mailbox_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox = NULL; - int count = 0; - int i = 0; - int handle; - int on_server ; - - tet_infoline("uts_Email_Delete_Mailbox_01 : Begin\n"); - - err_code = email_get_mailbox_list(g_accountId , 1, &pMailbox, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mailbox list : Success\n"); - if (count > 0) { - i = 0; - on_server = pMailbox[i].local; - err_code = email_delete_mailbox(pMailbox[i].mailbox_id, on_server, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("email delete mailbox : Success\n"); - tet_result(TET_PASS); - email_delete_account(g_accountId); - } - else { - tet_printf("Email delete mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - } - else { - tet_printf("Email get mailbox list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Delete_Mailbox_02 - TestObjective : To validate parameter for mailbox in delete mailbox - APIs Tested : int email_delete_mailbox(int input_mailbox_id, int input_on_server, unsigned* output_handle) - */ - -static void uts_Email_Delete_Mailbox_02() -{ - int err_code = EMAIL_ERROR_NONE ; - int handle; - int on_server = 0 ; - - tet_infoline("uts_Email_Delete_Mailbox_02 : Begin\n"); - - err_code = email_delete_mailbox(0, on_server, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("email delete mailbox : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete mailbox failed\n"); - tet_result(TET_FAIL); - } - -} - diff --git a/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.h b/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.h deleted file mode 100755 index f6599b4..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-delete-mailbox.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_Mailbox_01(void); -static void uts_Email_Delete_Mailbox_02(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Delete_Mailbox_01, 1}, {uts_Email_Delete_Mailbox_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.c b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.c deleted file mode 100755 index 08f72ff..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.c +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mailbox-by-mailboxtype.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - tet_printf("g_accountId [%d], count[%d]\n", g_accountId, count); - email_free_account(&pAccount, count); - - } - - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mailbox_By_Mailboxtype_01 - TestObjective : To get mailbox by mailbox type - APIs Tested : int email_get_mailbox_by_mailbox_type(int account_id, email_mailbox_type_e mailbox_type, email_mailbox_t **mailbox) - */ - -static void uts_Email_Get_Mailbox_By_Mailboxtype_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox = NULL; - int mailbox_type = EMAIL_MAILBOX_TYPE_INBOX; - - tet_infoline("uts_Email_Get_Mailbox_By_Mailboxtype_01 : Begin\n"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , mailbox_type, &pMailbox); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mailbox by mailbox type : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Mailbox_By_Mailboxtype_02 - TestObjective : To validate parameter for account_id in get mailbox by mailbox_type - APIs Tested : int email_get_mailbox_by_mailbox_type(int account_id, email_mailbox_type_e mailbox_type, email_mailbox_t **mailbox) - */ - -static void uts_Email_Get_Mailbox_By_Mailboxtype_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox = NULL; - int account_id = -1; - int mailbox_type = EMAIL_MAILBOX_TYPE_USER_DEFINED; - - tet_infoline("uts_Email_Get_Mailbox_By_Mailboxtype_02 : Begin\n"); - - err_code = email_get_mailbox_by_mailbox_type(account_id , mailbox_type, &pMailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox by mailbox type : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by mailbox type failed : \n"); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Mailbox_By_Mailboxtype_03 - TestObjective : To validate parameter for mailbox in get mailbox by mailbox_type - APIs Tested : int email_get_mailbox_by_mailbox_type(int account_id, email_mailbox_type_e mailbox_type, email_mailbox_t **mailbox) - */ - -static void uts_Email_Get_Mailbox_By_Mailboxtype_03() -{ - int err_code = EMAIL_ERROR_NONE ; - int mailbox_type = EMAIL_MAILBOX_TYPE_USER_DEFINED; - - tet_infoline("uts_Email_Get_Mailbox_By_Mailboxtype_03 : Begin\n"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , mailbox_type, NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox by mailbox type : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by mailbox type failed : \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.h b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.h deleted file mode 100755 index 47eec5a..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mailbox_By_Mailboxtype_01(void); -static void uts_Email_Get_Mailbox_By_Mailboxtype_02(void); -static void uts_Email_Get_Mailbox_By_Mailboxtype_03(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Mailbox_By_Mailboxtype_01, 1}, {uts_Email_Get_Mailbox_By_Mailboxtype_02, 2}, {uts_Email_Get_Mailbox_By_Mailboxtype_03, 3}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.c b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.c deleted file mode 100755 index fd865f7..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.c +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mailbox-by-name.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - } - - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Get_Mailbox_By_Name_01 - TestObjective : To get mailbox information by name - APIs Tested : int email_get_mailbox_by_name(int account_id, const char *pMailboxName, emf_mailbox_t **mailbox) - */ - -static void uts_Email_Get_Mailbox_By_Name_01() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox = NULL; - char *pMailboxName; - - tet_infoline("uts_Email_Get_Mailbox_By_Name_01 : Begin\n"); - - pMailboxName = strdup("INBOX"); - err_code = email_get_mailbox_by_name(g_accountId , pMailboxName, &pMailbox); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mailbox by name : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by name failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Mailbox_by_Name_02 - TestObjective : To validate parameter for account_id in get mailbox by name - APIs Tested : int email_get_mailbox_by_name(int account_id, const char *pMailboxName, emf_mailbox_t **pMailbox) - */ - -static void uts_Email_Get_Mailbox_By_Name_02() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox = NULL; - char *pMailboxName; - int account_id = -1; - - tet_infoline("uts_Email_Get_Mailbox_By_Name_02 Begin\n"); - - pMailboxName = strdup("INBOX"); - err_code = email_get_mailbox_by_name(account_id , pMailboxName, &pMailbox); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox by name validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by name validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Get_Mailbox_by_Name_03 - TestObjective : To validate parameter for pMailboxName in get mailbox by name - APIs Tested : int email_get_mailbox_by_name(int account_id, const char *pMailboxName, emf_mailbox_t **pMailbox) - */ - -static void uts_Email_Get_Mailbox_By_Name_03() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox = NULL; - - tet_infoline("uts_Email_Get_Mailbox_By_Name_03 Begin\n"); - - err_code = email_get_mailbox_by_name(g_accountId , NULL, &pMailbox); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox by name validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by name validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_by_Name_04 - TestObjective : To validate parameter for pMailbox in get mailbox by name - APIs Tested : int email_get_mailbox_by_name(int account_id, const char *pMailboxName, emf_mailbox_t **pMailbox) - */ - -static void uts_Email_Get_Mailbox_By_Name_04() -{ - int err_code = EMF_ERROR_NONE ; - char *pMailboxName; - - tet_infoline("uts_Email_Get_Mailbox_By_Name_04 Begin\n"); - - pMailboxName = strdup("INBOX"); - err_code = email_get_mailbox_by_name(g_accountId, pMailboxName, NULL); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox by name validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox by name validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.h b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.h deleted file mode 100755 index cfc730e..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-by-name.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mailbox_By_Name_01(void); -static void uts_Email_Get_Mailbox_By_Name_02(void); -static void uts_Email_Get_Mailbox_By_Name_03(void); -static void uts_Email_Get_Mailbox_By_Name_04(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Mailbox_By_Name_01, 1}, {uts_Email_Get_Mailbox_By_Name_02, 2}, {uts_Email_Get_Mailbox_By_Name_03, 3}, {uts_Email_Get_Mailbox_By_Name_04, 4}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.c b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.c deleted file mode 100755 index 5cc8726..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.c +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mailbox-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - - -/*Testcase : uts_Email_Get_Mailbox_List_01 - TestObjective : To get all local folderlist - APIs Tested : int email_get_mailbox_list(int account_id, int local_yn, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox_list = NULL; - int count = 0; - int local_yn = 0; - - tet_infoline("uts_Email_Get_Mailbox_List_01 Begin\n"); - - err_code = email_get_mailbox_list(g_accountId, local_yn, &pMailbox_list, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get all local mailboxes : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all local mailboxes failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Mailbox_List_02 - TestObjective : To get all server mailbox list as well as local folderlist - APIs Tested : int email_get_mailbox_list(int account_id, int local_yn, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox_list = NULL; - int local_yn = 1; - int count = 0; - - tet_infoline("uts_Email_Get_Mailbox_List_02 Begin\n"); - - err_code = email_get_mailbox_list(g_accountId , local_yn, &pMailbox_list, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get all server & local mailboxes : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all server & local mailboxes failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_List_03 - TestObjective : To validate parameter for account_id in get all mailbox list - APIs Tested : int email_get_mailbox_list(int account_id, int local_yn, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_03() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox_list = NULL; - int local_yn = 1; - int count = 0; - int account_id = -1; - - tet_infoline("uts_Email_Get_Mailbox_List_03 Begin\n"); - - err_code = email_get_mailbox_list(account_id , local_yn, &pMailbox_list, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get all mailboxes validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all mailboxes validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_List_04 - TestObjective : To validate parameter for mailbox_list in get all mailbox list - APIs Tested : int email_get_mailbox_list(int account_id, int local_yn, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_04() -{ - int err_code = EMAIL_ERROR_NONE ; - int local_yn = 1; - int count = 0; - int account_id = 1; - - tet_infoline("uts_Email_Get_Mailbox_List_04 Begin\n"); - - err_code = email_get_mailbox_list(account_id , local_yn, NULL, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get all mailboxes validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all mailboxes validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_List_05 - TestObjective : To validate parameter for count in get all mailbox list - APIs Tested : int email_get_mailbox_list(int account_id, int local_yn, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_05() -{ - int err_code = EMAIL_ERROR_NONE ; - email_mailbox_t *pMailbox_list = NULL; - int local_yn = 1; - int account_id = 1; - - tet_infoline("uts_Email_Get_Mailbox_List_05 Begin\n"); - - err_code = email_get_mailbox_list(account_id , local_yn, &pMailbox_list, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get all mailboxes validate parameter : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all mailboxes validate parameter failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.h b/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.h deleted file mode 100755 index 270cf78..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-mailbox-list.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mailbox_List_01(void); -static void uts_Email_Get_Mailbox_List_02(void); -static void uts_Email_Get_Mailbox_List_03(void); -static void uts_Email_Get_Mailbox_List_04(void); -static void uts_Email_Get_Mailbox_List_05(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Mailbox_List_01, 1}, {uts_Email_Get_Mailbox_List_02, 2}, {uts_Email_Get_Mailbox_List_03, 3}, {uts_Email_Get_Mailbox_List_04, 4}, {uts_Email_Get_Mailbox_List_05, 5}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.c b/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.c deleted file mode 100755 index 39b5e16..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.c +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-sub-mailbox-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Get_Sub_Mailbox_List_01 - TestObjective : To get sub folderlist - APIs Tested : int email_get_child_mailbox_list(int account_id, const char *parent_folder, emf_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Sub_Mailbox_List_01() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox_list = NULL; - int i = 0; - int count = 0; - char *pParent_folder; - emf_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Get_Sub_Mailbox_List_01 : Begin\n"); - pParent_folder = strdup("INBOX"); - - err_code = email_get_child_mailbox_list(g_accountId , pParent_folder, &pMailbox_list, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get subfolder list : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get subfolder list failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Sub_Mailbox_List_02 - TestObjective : To validate parameter for account_id in get sub folderlist - APIs Tested : int email_get_child_mailbox_list(int account_id, const char *parent_folder, emf_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Sub_Mailbox_List_02() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox_list = NULL; - int count = 0; - int account_id = -1; - char *pParent_folder = NULL; - - tet_infoline("uts_Email_Get_Sub_Mailbox_List_02 : Begin\n"); - - pParent_folder = strdup("INBOX"); - err_code = email_get_child_mailbox_list(account_id , pParent_folder, &pMailbox_list, &count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get subfolder list : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get subfolder list failed : \n"); - tet_result(TET_FAIL); - } - -} - - - -/*Testcase : uts_Email_Get_Sub_Mailbox_List_03 - TestObjective : To validate parameter for parent mailbox in get sub folderlist - APIs Tested : int email_get_child_mailbox_list(int account_id, const char *parent_folder, emf_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Sub_Mailbox_List_03() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox_list = NULL; - int count = 0; - int account_id = -1; - - tet_infoline("uts_Email_Get_Sub_Mailbox_List_03 : Begin\n"); - - err_code = email_get_child_mailbox_list(account_id , NULL, &pMailbox_list, &count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get subfolder list : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get subfolder list failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Sub_Mailbox_List_04 - TestObjective : To validate parameter for mailbox_list in get sub folderlist - APIs Tested : int email_get_child_mailbox_list(int account_id, const char *parent_folder, emf_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Sub_Mailbox_List_04() -{ - int err_code = EMF_ERROR_NONE ; - int count = 0; - char *pParent_folder = NULL; - - tet_infoline("uts_Email_Get_Sub_Mailbox_List_04 : Begin\n"); - - pParent_folder = strdup("INBOX"); - err_code = email_get_child_mailbox_list(g_accountId , pParent_folder, NULL, &count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get subfolder list : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get subfolder list failed : \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Get_Sub_Mailbox_List_05 - TestObjective : To validate parameter for count in get sub folderlist - APIs Tested : int email_get_child_mailbox_list(int account_id, const char *parent_folder, emf_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Sub_Mailbox_List_05() -{ - int err_code = EMF_ERROR_NONE ; - emf_mailbox_t *pMailbox_list = NULL; - char *pParent_folder = NULL; - - tet_infoline("uts_Email_Get_Sub_Mailbox_List_05 : Begin\n"); - - pParent_folder = strdup("INBOX"); - err_code = email_get_child_mailbox_list(g_accountId , pParent_folder, &pMailbox_list, 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get subfolder list : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get subfolder list failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.h b/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.h deleted file mode 100755 index 8fda876..0000000 --- a/TC/TC_email_service/TC_Folder/uts-email-get-sub-mailbox-list.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Mailbox.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Sub_Mailbox_List_01(void); -static void uts_Email_Get_Sub_Mailbox_List_02(void); -static void uts_Email_Get_Sub_Mailbox_List_03(void); -static void uts_Email_Get_Sub_Mailbox_List_04(void); -static void uts_Email_Get_Sub_Mailbox_List_05(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Sub_Mailbox_List_01, 1}, {uts_Email_Get_Sub_Mailbox_List_02, 2}, {uts_Email_Get_Sub_Mailbox_List_03, 3}, {uts_Email_Get_Sub_Mailbox_List_04, 4}, {uts_Email_Get_Sub_Mailbox_List_05, 5}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Init/Makefile b/TC/TC_email_service/TC_Init/Makefile deleted file mode 100755 index bd39e8a..0000000 --- a/TC/TC_email_service/TC_Init/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts-email-service-begin \ - uts-email-open-db \ - uts-email-init-storage \ - uts-email-ping-service \ - uts-email-service-end \ - uts-email-close-db - -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = -I. `pkg-config --cflags $(PKGS)` -INCS += -I. `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_email_service/TC_Utility - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Init/tslist b/TC/TC_email_service/TC_Init/tslist deleted file mode 100755 index f6be9c5..0000000 --- a/TC/TC_email_service/TC_Init/tslist +++ /dev/null @@ -1,6 +0,0 @@ -uts-email-service-begin -uts-email-open-db -uts-email-init-storage -uts-email-ping-service -uts-email-close-db -uts-email-service-end diff --git a/TC/TC_email_service/TC_Init/uts-email-close-db.c b/TC/TC_email_service/TC_Init/uts-email-close-db.c deleted file mode 100755 index 78a7d96..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-close-db.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-close-db.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); -} - - - - - -/*Testcase : uts_Email_Close_Db_01 - TestObjective : To close db - APIs Tested : int email_close_db() - */ - -static void uts_Email_Close_Db_01() -{ - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email Close DB failed\n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Init/uts-email-close-db.h b/TC/TC_email_service/TC_Init/uts-email-close-db.h deleted file mode 100755 index e06c2e7..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-close-db.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Close_Db_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Close_Db_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Init/uts-email-init-storage.c b/TC/TC_email_service/TC_Init/uts-email-init-storage.c deleted file mode 100755 index dae1ce8..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-init-storage.c +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-init-storage.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Init_Storage_01 - TestObjective : To initialize email storage - APIs Tested : int email_init_storage() - */ - -static void uts_Email_Init_Storage_01() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Init_Storage_01"); - err_code = email_init_storage(); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("email init storage : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("uts_Email_Init_Storage_01 failed : err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Init/uts-email-init-storage.h b/TC/TC_email_service/TC_Init/uts-email-init-storage.h deleted file mode 100755 index 48969b5..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-init-storage.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Init_Storage_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Init_Storage_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Init/uts-email-open-db.c b/TC/TC_email_service/TC_Init/uts-email-open-db.c deleted file mode 100755 index 879d0d9..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-open-db.c +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-open-db.h" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Open_Db_01 - TestObjective : To Open Db - APIs Tested : int email_open_db() - */ - -static void uts_Email_Open_Db_01() -{ - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email open DB failed\n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Init/uts-email-open-db.h b/TC/TC_email_service/TC_Init/uts-email-open-db.h deleted file mode 100755 index bd168ad..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-open-db.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Open_Db_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Open_Db_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Init/uts-email-ping-service.c b/TC/TC_email_service/TC_Init/uts-email-ping-service.c deleted file mode 100755 index 9958dd3..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-ping-service.c +++ /dev/null @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-ping-service.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Ping_Service_01 - TestObjective : To ping email service - APIs Tested : int email_ping_service() - */ - -static void uts_Email_Ping_Service_01() -{ - if (EMAIL_ERROR_NONE == email_ping_service()) { - tet_infoline("uts_Email_Ping_Service_01 : Success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email Ping Service Failed : \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Init/uts-email-ping-service.h b/TC/TC_email_service/TC_Init/uts-email-ping-service.h deleted file mode 100755 index b57659f..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-ping-service.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Ping_Service_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Ping_Service_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Init/uts-email-service-begin.c b/TC/TC_email_service/TC_Init/uts-email-service-begin.c deleted file mode 100755 index 1e6ff27..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-service-begin.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-service-begin.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Service_Begin_01 - TestObjective : To start email service - APIs Tested : int email_service_begin() - */ - -static void uts_Email_Service_Begin_01() -{ - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - tet_result(TET_PASS); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_result(TET_FAIL); - tet_infoline("Email service not started\n"); - } - -} - - diff --git a/TC/TC_email_service/TC_Init/uts-email-service-begin.h b/TC/TC_email_service/TC_Init/uts-email-service-begin.h deleted file mode 100755 index e18b0ea..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-service-begin.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Service_Begin_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Service_Begin_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Init/uts-email-service-end.c b/TC/TC_email_service/TC_Init/uts-email-service-end.c deleted file mode 100755 index 6810089..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-service-end.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-service-end.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); -} - - - - - -/*Testcase : uts_Email_Service_End_01 - TestObjective : To close email service - APIs Tested : int email_service_end() - */ - -static void uts_Email_Service_End_01() -{ - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - - if (EMAIL_ERROR_NONE == email_service_end()) { - tet_infoline("Email service close Success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email service end failed\n"); - tet_result(TET_FAIL); - } - } - else - tet_infoline("Email Close DB failed\n"); - -} - - diff --git a/TC/TC_email_service/TC_Init/uts-email-service-end.h b/TC/TC_email_service/TC_Init/uts-email-service-end.h deleted file mode 100755 index 99e0e88..0000000 --- a/TC/TC_email_service/TC_Init/uts-email-service-end.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Service_End_01(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Service_End_01, 1}, {NULL, 0} - - -}; diff --git a/TC/TC_email_service/TC_Message/Makefile b/TC/TC_email_service/TC_Message/Makefile deleted file mode 100644 index cf19547..0000000 --- a/TC/TC_email_service/TC_Message/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts-email-add-message \ - uts-email-add-attachment \ - uts-email-update-message \ - uts-email-count-message \ - uts-email-delete-message \ - uts-email-delete-attachment \ - uts-email-get-info \ - uts-email-free-mail-info \ - uts-email-get-disk-space-usage \ - uts-email-get-max-mail-count \ - uts-email-cancel-send-mail \ - uts-email-send-retry \ - uts-email-get-mail-list-ex \ - uts-email-get-attachment-info \ - uts-email-free-attachment-info \ - uts-email-move-mail-to-folder \ - uts-email-move-all-mails-to-folder \ - uts-email-get-mailbox-list \ - uts-email-delete-all-message-in-folder \ - uts-email-free-mailbox \ - uts-email-create-db-full \ - uts-email-clear-mail-data \ - -# uts-email-query-message \ - uts-email-add-query-message \ - uts-email-release-query-message \ - uts-email-get-list-by-emails \ - uts-email-get-mail-list-for-thread-view \ - uts-email-get-mail-list-of-thread \ - uts-email-get-mail-list-of-sender \ - uts-email-get-thread-information \ - uts-email-searched-mail-list \ - uts-email-get-searched-mail-list_by-count \ - uts-email-get-mail-list-by-count \ - uts-email-convert-mailbox-name-to-utf8 \ - uts-email-convert-text-utf8 \ - uts-email-convert-utf8-text \ - uts-email-get-mail-during-sync \ - uts-email-count-message-with-searching \ - uts-email-get-rfc-822 \ - uts-email-parse-rfc-822 \ - uts-email-free-envelope \ - uts-email-get-temp-file-size \ - uts-email-get-mail-list (deprecated function) -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = `pkg-config --cflags $(PKGS)` -INCS += `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_Utility/include - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Message/tslist b/TC/TC_email_service/TC_Message/tslist deleted file mode 100755 index b178c86..0000000 --- a/TC/TC_email_service/TC_Message/tslist +++ /dev/null @@ -1,22 +0,0 @@ -uts-email-add-message -uts-email-add-attachment -uts-email-get-info -uts-email-get-attachment-info -uts-email-get-mail-list-ex -uts-email-get-disk-space-usage -uts-email-get-max-mail-count -uts-email-get-mailbox-list -uts-email-update-message -uts-email-count-message -uts-email-cancel-send-mail -uts-email-send-retry -uts-email-move-mail-to-folder -uts-email-move-all-mails-to-folder -uts-email-free-mail-info -uts-email-free-attachment-info -uts-email-free-mailbox -uts-email-delete-attachment -uts-email-delete-message -uts-email-delete-all-message-in-folder -uts-email-create-db-full -uts-email-clear-mail-data diff --git a/TC/TC_email_service/TC_Message/uts-email-add-attachment.c b/TC/TC_email_service/TC_Message/uts-email-add-attachment.c deleted file mode 100755 index fd95bf6..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-add-attachment.c +++ /dev/null @@ -1,278 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-add-attachment.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mailbox_t mbox; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) - { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - } else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } else - tet_infoline("Email open DB failed\n"); - } else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Add_Attachment_01 - TestObjective : To add attachment to mail - APIs Tested : int email_add_attachment(int mail_id, email_attachment_data_t* attachment) - */ - -static void uts_Email_Add_Attachment_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_attachment_data_t attachment; - email_mail_list_item_t *mail_list = NULL; - email_account_t *account = NULL ; - FILE *fp = NULL; - - - tet_infoline("uts_Email_Add_Attachment_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) - { - tet_infoline("Email get account list success\n"); - if (count > 0) - { - g_accountId = account[i].account_id; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - memset(&attachment, 0x00, sizeof(email_attachment_data_t)); - attachment.attachment_name = strdup("Test attachment"); - attachment.attachment_path = strdup("/tmp/mail.txt"); - fp = fopen("/tmp/mail.txt", "w"); - fprintf(fp, "xxxxxxxxx"); - fclose(fp); - i = 0; - err_code = email_add_attachment(mail_list[i].mail_id , &attachment); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email add attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add attachment : Failed err_code[%d]", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Add_Attchment_02 - TestObjective : To validate parameter for mailbox in add attachment to mail - APIs Tested : int email_add_attachment(int mail_id, email_attachment_data_t* attachment) - */ - -static void uts_Email_Add_Attachment_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_attachment_data_t attachment; - - tet_infoline("uts_Email_Add_attachment_02 Begin\n"); - - memset(&attachment, 0x00, sizeof(email_attachment_data_t)); - attachment.attachment_name = strdup("Test"); - - err_code = email_add_attachment(1 , &attachment); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add attachment : Failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Add_Attchment_03 - TestObjective : To validate parameter for mailbox account_id in add attachment to mail - APIs Tested : int email_add_attachment(int mail_id, email_attachment_data_t* attachment) - */ - -static void uts_Email_Add_Attachment_03() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 1; - email_attachment_data_t attachment; - - tet_infoline("uts_Email_Add_attachment_02 Begin\n"); - - memset(&attachment, 0x00, sizeof(email_attachment_data_t)); - attachment.attachment_name = strdup("Test"); - - err_code = email_add_attachment(mail_id , &attachment); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add attachment : Failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Add_Attchment_04 - TestObjective : To validate parameter for mail_id in add attachment to mail - APIs Tested : int email_add_attachment(int mail_id, email_attachment_data_t* attachment) - */ - -static void uts_Email_Add_Attachment_04() -{ - int err_code = EMAIL_ERROR_NONE; - int i = 0; - email_attachment_data_t attachment; - - tet_infoline("uts_Email_Add_attachment_04 Begin\n"); - - - memset(&attachment, 0x00, sizeof(email_attachment_data_t)); - attachment.attachment_name = strdup("Test"); - - err_code = email_add_attachment( 0 , &attachment); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add attachment : Failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Add_Attchment_05 - TestObjective : To validate parameter for mailbox in add attachment to mail - APIs Tested : int email_add_attachment(int mail_id, email_attachment_data_t* attachment) - */ - -static void uts_Email_Add_Attachment_05() -{ - int err_code = EMAIL_ERROR_NONE; - int i = 0; - - tet_infoline("uts_Email_Add_attachment_05 Begin\n"); - - err_code = email_add_attachment( 1 , NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add attachment : Failed\n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-add-attachment.h b/TC/TC_email_service/TC_Message/uts-email-add-attachment.h deleted file mode 100755 index 8513ffa..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-add-attachment.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Attachment_01(void); -static void uts_Email_Add_Attachment_02(void); -static void uts_Email_Add_Attachment_03(void); -static void uts_Email_Add_Attachment_04(void); -static void uts_Email_Add_Attachment_05(void); - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Add_Attachment_01, 1}, { uts_Email_Add_Attachment_02, 2}, { uts_Email_Add_Attachment_03, 3}, { uts_Email_Add_Attachment_04, 4}, { uts_Email_Add_Attachment_05, 5}, {NULL, 0} -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-add-message.c b/TC/TC_email_service/TC_Message/uts-email-add-message.c deleted file mode 100755 index 06e0f91..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-add-message.c +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-add-message.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mailbox_t mbox; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Add_Message_01 - TestObjective : To save message - APIs Tested : int email_add_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t* input_meeting_request, int input_from_eas) - */ - -static void uts_Email_Add_Message_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_mail_data_t *test_mail_data = NULL; - email_attachment_data_t *attachment_data = NULL; - email_meeting_request_t *meeting_req = NULL; - - FILE *fp; - email_option_t option; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Add_Message_01 Begin\n"); - - - memset(&option, 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - - test_mail_data = malloc(sizeof(email_mail_data_t)); - memset(test_mail_data, 0x00, sizeof(email_mail_data_t)); - - attachment_data = malloc(sizeof(email_attachment_data_t)); - memset(attachment_data, 0x00, sizeof(email_attachment_data_t)); - - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - test_mail_data->account_id = account[i].account_id; - g_accountId = account[i].account_id; - test_mail_data->flags_draft_field = 1; - - tet_printf("g_accountId[%d]\n", g_accountId); - - test_mail_data->full_address_from = strdup(""); - test_mail_data->full_address_to = strdup(""); - test_mail_data->subject = strdup("Test"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return ; - } - - test_mail_data->mailbox_id = mailbox->mailbox_id; - test_mail_data->mailbox_type = mailbox->mailbox_type; - - test_mail_data->save_status = 1; - test_mail_data->body_download_status = 1; - - fp = fopen("/tmp/mail.txt", "w"); - fprintf(fp, "xxxxxxxxx"); - fclose(fp); - test_mail_data->file_path_plain = strdup("/tmp/mail.txt"); - test_mail_data->attachment_count = 1; - - fp = fopen("/tmp/attach.txt", "w"); - fprintf(fp, "Simple Attachment"); - fclose(fp); - - attachment_data->attachment_name = strdup("Attach"); - attachment_data->attachment_path = strdup("/tmp/attach.txt"); - attachment_data->save_status = 1; - - err_code = email_add_mail(test_mail_data, attachment_data, 1, NULL, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email add message Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add message failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - tet_infoline("Free email data\n"); - - email_free_attachment_data(&attachment_data, 1); - email_free_mail_data(&test_mail_data, 1); - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Add_Message_02 - TestObjective : To validate parameter for mail in add message - APIs Tested : int email_add_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t* input_meeting_request, int input_from_eas) - */ - -static void uts_Email_Add_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - - - tet_infoline("uts_Email_Add_Message_02 Begin\n"); - - err_code = email_add_mail(NULL, NULL, 0, NULL, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email add message : failed \n"); - tet_result(TET_FAIL); - } - - -} - diff --git a/TC/TC_email_service/TC_Message/uts-email-add-message.h b/TC/TC_email_service/TC_Message/uts-email-add-message.h deleted file mode 100755 index 31f1da3..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-add-message.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Message_01(void); -static void uts_Email_Add_Message_02(void); - - - - - - -struct tet_testlist tet_testlist[] = { - {uts_Email_Add_Message_01, 1}, {uts_Email_Add_Message_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.c b/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.c deleted file mode 100755 index a53223c..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.c +++ /dev/null @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-cancel-send-mail.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Cancel_Send_Mail_01 - TestObjective : To get the total count and unread count of all mailboxes - APIs Tested : int email_cancel_sending_mail(int mail_id) - */ - -static void uts_Email_Cancel_Send_Mail_01() -{ - int err_code = EMAIL_ERROR_NONE; - email_mail_list_item_t *mail_list = NULL; - int account_id = 0; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_infoline("uts_Email_Cancel_Send_Mail_01 Begin\n"); - - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE != err_code || count <= 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - - count = 0; - err_code = uts_Email_Get_Mail_List_03(pAccount[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - err_code = email_cancel_sending_mail(mail_list[i].mail_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Cancel Send Mail Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Cancel Send Mail Failed\n"); - tet_result(TET_FAIL); - } - } - else { - tet_printf("email_get_mail_list() Failed : failed error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Cancel_Send_Mail_02 - TestObjective : To validate parameter for mail_id in cancel send mail - APIs Tested : int email_cancel_sending_mail(int mail_id) - */ - -static void uts_Email_Cancel_Send_Mail_02() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = -1; - - tet_infoline("uts_Email_Cancel_Send_Mail_02 Begin\n"); - - err_code = email_cancel_sending_mail(mail_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Cancel Send Mail Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Cancel Send Mail failed : \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.h b/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.h deleted file mode 100755 index 208ea71..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-cancel-send-mail.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Cancel_Send_Mail_01(void); -static void uts_Email_Cancel_Send_Mail_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Cancel_Send_Mail_01, 1}, { uts_Email_Cancel_Send_Mail_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.c b/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.c deleted file mode 100755 index 561bb54..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.c +++ /dev/null @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-clear-mail-data.h" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Clear_Mail_Data_01 - TestObjective : To Clear Mail data - APIs Tested : int email_clear_mail_data() - */ - -static void uts_Email_Clear_Mail_Data_01() -{ - int err_code = EMAIL_ERROR_NONE; - err_code = email_clear_mail_data(); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email clear mail data Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email clear mail data failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - } - - -/*Testcase : uts_Email_Clear_Mail_Data_02 - TestObjective : To validate parameter - APIs Tested : int email_clear_mail_data() - */ - -static void uts_Email_Clear_Mail_Data_02() -{ - int err_code = EMAIL_ERROR_NONE; - - /* this function has no paramete */ - tet_result(TET_PASS); -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.h b/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.h deleted file mode 100755 index 698e997..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-clear-mail-data.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Clear_Mail_Data_01(void); -static void uts_Email_Clear_Mail_Data_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Clear_Mail_Data_01, 1}, { uts_Email_Clear_Mail_Data_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.c b/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.c deleted file mode 100755 index 66a5dbb..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-count-message-all-mailboxes.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Count_Message_All_Mailboxes_01 - TestObjective : To get the total count and unread count of all mailboxes - APIs Tested : int email_count_message_all_mailboxes(emf_mailbox_t *mailbox, int *total, int *unseen) - */ - -static void uts_Email_Count_Message_All_Mailboxes_01() -{ - int err_code = EMF_ERROR_NONE; - emf_mailbox_t mailbox; - int total = 0; - int unseen = 0; - - tet_infoline("uts_Email_Count_Message_All_Mailboxes_01 Begin\n"); - - memset(&mailbox, 0x00, sizeof(emf_mailbox_t)); - mailbox.account_id = 1; - mailbox.name = strdup("INBOX"); - - err_code = email_count_message_all_mailboxes(&mailbox, &total, &unseen); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email Count message all mailboxes Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count messages all mailboxes failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Count_Message_All_Mailboxes_02 - TestObjective : To validate parameter for mailbox in get the total count and unread count of all mailboxes - APIs Tested : int email_count_message_all_mailboxes(emf_mailbox_t *mailbox, int *total, int *unseen) - */ - -static void uts_Email_Count_Message_All_Mailboxes_02() -{ - int err_code = EMF_ERROR_NONE; - int total = 0; - int unseen = 0; - - tet_infoline("uts_Email_Count_Message_All_Mailboxes_02 Begin\n"); - - err_code = email_count_message_all_mailboxes(NULL, &total, &unseen); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count message all mailboxes Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count messages all mailboxes failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Count_Message_All_Mailboxes_03 - TestObjective : To validate parameter for total in get the total count and unread count of all mailboxes - APIs Tested : int email_count_message_all_mailboxes(emf_mailbox_t *mailbox, int *total, int *unseen) - */ - -static void uts_Email_Count_Message_All_Mailboxes_03() -{ - int err_code = EMF_ERROR_NONE; - emf_mailbox_t mailbox; - int total = 0; - int unseen = 0; - - tet_infoline("uts_Email_Count_Message_All_Mailboxes_03 Begin\n"); - - memset(&mailbox, 0x00, sizeof(emf_mailbox_t)); - mailbox.account_id = 0; - mailbox.name = strdup("INBOX"); - - err_code = email_count_message_all_mailboxes(&mailbox, 0, &unseen); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count message all mailboxes Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count messages all mailboxes failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Count_Message_All_Mailboxes_04 - TestObjective : To validate parameter for unseen in get the total count and unread count of all mailboxes - APIs Tested : int email_count_message_all_mailboxes(emf_mailbox_t *mailbox, int *total, int *unseen) - */ - -static void uts_Email_Count_Message_All_Mailboxes_04() -{ - int err_code = EMF_ERROR_NONE; - emf_mailbox_t mailbox; - int total = 0; - int unseen = 0; - - tet_infoline("uts_Email_Count_Message_All_Mailboxes_04 Begin\n"); - - memset(&mailbox, 0x00, sizeof(emf_mailbox_t)); - mailbox.account_id = 0; - mailbox.name = strdup("INBOX"); - - err_code = email_count_message_all_mailboxes(&mailbox, &total, 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count message all mailboxes Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count messages all mailboxes failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.h b/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.h deleted file mode 100755 index ff141aa..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-all-mailboxes.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Count_Message_All_Mailboxes_01(void); -static void uts_Email_Count_Message_All_Mailboxes_02(void); -static void uts_Email_Count_Message_All_Mailboxes_03(void); -static void uts_Email_Count_Message_All_Mailboxes_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Count_Message_All_Mailboxes_01, 1}, { uts_Email_Count_Message_All_Mailboxes_02, 2}, { uts_Email_Count_Message_All_Mailboxes_03, 3}, { uts_Email_Count_Message_All_Mailboxes_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.c b/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.c deleted file mode 100755 index 601b28f..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.c +++ /dev/null @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-count-message-on-sending.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Count_Message_On_Sending_01 - TestObjective : Get the number of mails which are being sent in specific mailbox - APIs Tested : int email_count_message_on_sending(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_On_Sending_01() -{ - int err_code = EMF_ERROR_NONE; - int total_count = 0; - emf_mailbox_t mbox; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Count_message_On_Sending_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &total_count); - if (EMF_ERROR_NONE != err_code || total_count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mbox.account_id = account[0].account_id ; - total_count = 0; - err_code = email_count_message_on_sending(&mbox, &total_count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email count Message On sending : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message On Sending : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Count_Message_On_Sending_02 - TestObjective : Validate parameter for mailbox in Get the number of mails which are being sent in specific mailbox - APIs Tested : int email_count_message_on_sending(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_On_Sending_02() -{ - int err_code = EMF_ERROR_NONE; - int total_count = 0; - - tet_infoline("utc_Email_Count_message_on_Sending_02 Begin\n"); - - err_code = email_count_message_on_sending(NULL , &total_count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count Message On Sending : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message On Sending : Failed \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Count_Message_On_Sending_03 - TestObjective : Validate parameter for total_count in Get the number of mails which are being sent in specific mailbox - APIs Tested : int email_count_message_on_sending(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_On_Sending_03() -{ - int err_code = EMF_ERROR_NONE; - emf_mailbox_t mbox; - - tet_infoline("utc_Email_Count_message_On_Sending_03 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_count_message_on_sending(&mbox, 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count Message On Sending : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message On Sending : Failed \n"); - tet_result(TET_FAIL); - } -} - - - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.h b/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.h deleted file mode 100755 index cc5054b..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-on-sending.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Count_Message_On_Sending_01(void); -static void uts_Email_Count_Message_On_Sending_02(void); -static void uts_Email_Count_Message_On_Sending_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Count_Message_On_Sending_01, 1}, { uts_Email_Count_Message_On_Sending_02, 2}, { uts_Email_Count_Message_On_Sending_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.c b/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.c deleted file mode 100755 index e572de1..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.c +++ /dev/null @@ -1,198 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-count-message-with-draft-flag.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Count_Message_With_Draft_Flag_01 - TestObjective : Get mail count from mailbox having draft flag. - APIs Tested : int email_count_message_with_draft_flag(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_With_Draft_Flag_01() -{ - int err_code = EMF_ERROR_NONE; - int total_count = 0; - emf_mailbox_t mbox; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Count_Message_With_Draft_Flag_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &total_count); - if (EMF_ERROR_NONE != err_code || total_count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mbox.account_id = account[0].account_id ; - total_count = 0; - err_code = email_count_message_with_draft_flag(&mbox, &total_count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email count Message With Draft Flag : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message With Draft Flag : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Count_Message_With_Draft_Flag_02 - TestObjective : Validate Paraameter for Get mail count from mailbox having draft flag. - APIs Tested : int email_count_message_with_draft_flag(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_With_Draft_Flag_02() -{ - int err_code = EMF_ERROR_NONE; - int total_count = 0; - - tet_infoline("utc_Email_Count_message_With_Draft_Flag_02 Begin\n"); - - err_code = email_count_message_with_draft_flag(NULL , &total_count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count Message With Draft Flag : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message With Draft Flag : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Count_Message_With_Draft_Flag_03 - TestObjective : Validate parameterGet mail count from mailbox having draft flag. - APIs Tested : int email_count_message_with_draft_flag(emf_mailbox_t *mailbox, int *total) - */ - -static void uts_Email_Count_Message_With_Draft_Flag_03() -{ - int err_code = EMF_ERROR_NONE; - emf_mailbox_t mbox; - - tet_infoline("utc_Email_Count_message_With_Draft_Flag_03 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_count_message_with_draft_flag(&mbox, 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Count Message With Draft Flag : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Count Message With Draft Flag : Failed \n"); - tet_result(TET_FAIL); - } -} - - - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.h b/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.h deleted file mode 100755 index c4e82d3..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message-with-draft-flag.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Count_Message_With_Draft_Flag_01(void); -static void uts_Email_Count_Message_With_Draft_Flag_02(void); -static void uts_Email_Count_Message_With_Draft_Flag_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Count_Message_With_Draft_Flag_01, 1}, { uts_Email_Count_Message_With_Draft_Flag_02, 2}, { uts_Email_Count_Message_With_Draft_Flag_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message.c b/TC/TC_email_service/TC_Message/uts-email-count-message.c deleted file mode 100755 index 0c23d36..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message.c +++ /dev/null @@ -1,228 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-count-message.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Count_Message_01 - TestObjective : To get mail count for mailbox - APIs Tested : int email_count_mail(email_list_filter_t *input_filter_list, int input_filter_count, int *output_total_mail_count, int *output_unseen_mail_count) - */ - -static void uts_Email_Count_Message_01() -{ - int err_code = EMAIL_ERROR_NONE; - int total = 0; - int unseen = 0; - email_list_filter_t *filter_list = NULL; - - tet_infoline("utc_Email_Count_Message_01 Begin\n"); - - filter_list = malloc(sizeof(email_list_filter_t) * 3); - memset(filter_list, 0 , sizeof(email_list_filter_t) * 3); - - filter_list[0].list_filter_item_type = EMAIL_LIST_FILTER_ITEM_RULE; - filter_list[0].list_filter_item.rule.target_attribute = EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE; - filter_list[0].list_filter_item.rule.rule_type = EMAIL_LIST_FILTER_RULE_EQUAL; - filter_list[0].list_filter_item.rule.key_value.integer_type_value = EMAIL_MAILBOX_TYPE_INBOX; - filter_list[0].list_filter_item.rule.case_sensitivity = false; - - err_code = email_count_mail(filter_list, 1, &total, &unseen); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email count message : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email count message : failed error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Count_Message_02 - TestObjective : To validate parameter for mailbox in get mail count for mailbox - APIs Tested : int email_count_mail(email_list_filter_t *input_filter_list, int input_filter_count, int *output_total_mail_count, int *output_unseen_mail_count) - */ - -static void uts_Email_Count_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - int total = 0; - int unseen = 0; - - tet_infoline("utc_Email_Count_Message_02 Begin\n"); - - err_code = email_count_mail(NULL, 1, &total, &unseen); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email count message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email count message : failed \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Count_Message_03 - TestObjective : To validate parameter for total in get mail count for mailbox - APIs Tested : int email_count_mail(email_list_filter_t *input_filter_list, int input_filter_count, int *output_total_mail_count, int *output_unseen_mail_count) - */ - -static void uts_Email_Count_Message_03() -{ - int err_code = EMAIL_ERROR_NONE; - int unseen = 0; - email_list_filter_t *filter_list = NULL; - - tet_infoline("utc_Email_Count_Message_03 Begin\n"); - - filter_list = malloc(sizeof(email_list_filter_t) * 3); - memset(filter_list, 0 , sizeof(email_list_filter_t) * 3); - - filter_list[0].list_filter_item_type = EMAIL_LIST_FILTER_ITEM_RULE; - filter_list[0].list_filter_item.rule.target_attribute = EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE; - filter_list[0].list_filter_item.rule.rule_type = EMAIL_LIST_FILTER_RULE_EQUAL; - filter_list[0].list_filter_item.rule.key_value.integer_type_value = EMAIL_MAILBOX_TYPE_SENTBOX; - filter_list[0].list_filter_item.rule.case_sensitivity = false; - - err_code = email_count_mail(filter_list, 1, 0, &unseen); - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email count message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email count message : failed \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Count_Message_04 - TestObjective : To validate parameter for seen in get mail count for mailbox - APIs Tested : int email_count_mail(email_list_filter_t *input_filter_list, int input_filter_count, int *output_total_mail_count, int *output_unseen_mail_count) - */ - -static void uts_Email_Count_Message_04() -{ - int err_code = EMAIL_ERROR_NONE; - int total = 0; - email_list_filter_t *filter_list = NULL; - - tet_infoline("utc_Email_Count_Message_04 Begin\n"); - - filter_list = malloc(sizeof(email_list_filter_t) * 3); - memset(filter_list, 0 , sizeof(email_list_filter_t) * 3); - - filter_list[0].list_filter_item_type = EMAIL_LIST_FILTER_ITEM_RULE; - filter_list[0].list_filter_item.rule.target_attribute = EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE; - filter_list[0].list_filter_item.rule.rule_type = EMAIL_LIST_FILTER_RULE_EQUAL; - filter_list[0].list_filter_item.rule.key_value.integer_type_value = EMAIL_MAILBOX_TYPE_SENTBOX; - filter_list[0].list_filter_item.rule.case_sensitivity = false; - - err_code = email_count_mail(filter_list, 1, &total, 0); - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email count message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email count message : failed \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Message/uts-email-count-message.h b/TC/TC_email_service/TC_Message/uts-email-count-message.h deleted file mode 100755 index 00e696a..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-count-message.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Count_Message_01(void); -static void uts_Email_Count_Message_02(void); -static void uts_Email_Count_Message_03(void); -static void uts_Email_Count_Message_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Count_Message_01, 1}, { uts_Email_Count_Message_02, 2}, { uts_Email_Count_Message_03, 3}, { uts_Email_Count_Message_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-create-db-full.c b/TC/TC_email_service/TC_Message/uts-email-create-db-full.c deleted file mode 100755 index 4653ba5..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-create-db-full.c +++ /dev/null @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-create-db-full.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Create_Db_Full_01 - TestObjective : To Create DB full - APIs Tested : int email_create_db_full() - */ - -static void uts_Email_Create_Db_Full_01() -{ - int err_code = EMAIL_ERROR_NONE; - - err_code = email_create_db_full(); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Create Db Full Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Create Db Full Failed\n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Create_Db_Full_02 - TestObjective : email_create_db_full() have no parameter. return TET_PASS - APIs Tested : int email_create_db_full() - */ - -static void uts_Email_Create_Db_Full_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_result(TET_PASS); -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-create-db-full.h b/TC/TC_email_service/TC_Message/uts-email-create-db-full.h deleted file mode 100755 index 4ad647c..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-create-db-full.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Create_Db_Full_01(void); -static void uts_Email_Create_Db_Full_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Create_Db_Full_01, 1}, { uts_Email_Create_Db_Full_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.c b/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.c deleted file mode 100755 index 7f3b9d8..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-delete-all-message-in-folder.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Delete_All_Message_In_Folder_01 - TestObjective : To delete all message in mailbox message - APIs Tested : int email_delete_all_mails_in_mailbox(int input_mailbox_id, int input_from_server) - */ - -static void uts_Email_Delete_All_Message_In_Folder_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - email_mailbox_t *mailbox = NULL; - - tet_infoline("utc_Email_Delete_All_Message_In_Folder_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - err_code = email_get_mailbox_by_mailbox_type(account[i].account_id , EMAIL_MAILBOX_TYPE_SENTBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - err_code = email_delete_all_mails_in_mailbox(mailbox->mailbox_id, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email delete all message in mailbox : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete all message in mailbox failed : error_code[%d]\n", err_code); - tet_printf("account_id[%d], mailbox->mailbox_id[%d]\n", account[i].account_id, mailbox->mailbox_id); - tet_result(TET_FAIL); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } - -} - - - -/*Testcase : uts_Email_Delete_All_Message_In_Folder_02 - TestObjective : To validate parameter for mailbox in delete all message in mailbox message - APIs Tested : int email_delete_all_mails_in_mailbox(int input_mailbox_id, int input_from_server) - */ - -static void uts_Email_Delete_All_Message_In_Folder_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("utc_Email_delete_all_Message_in_folder Begin\n"); - - err_code = email_delete_all_mails_in_mailbox(0, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete all_message_in_folder : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email delete all_message in mailbox : failed \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.h b/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.h deleted file mode 100755 index 55298ac..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-all-message-in-folder.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_All_Message_In_Folder_01(void); -static void uts_Email_Delete_All_Message_In_Folder_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Delete_All_Message_In_Folder_01, 1}, { uts_Email_Delete_All_Message_In_Folder_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-attachment.c b/TC/TC_email_service/TC_Message/uts-email-delete-attachment.c deleted file mode 100755 index 7d5e007..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-attachment.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-delete-attachment.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Delete_Attachment_01 - TestObjective : To delete a attachment from mail - APIs Tested : int email_delete_attachment(int attachment_id) - */ - -static void uts_Email_Delete_Attachment_01() -{ - int err_code = EMAIL_ERROR_NONE; - int attachment_id = 0; - int i = 0; - email_attachment_data_t *mail_attach_info = NULL; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - email_account_t *account = NULL ; - - tet_infoline("uts_Email_Delete_Attachment_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - g_accountId = account[i].account_id; - - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - for (i ; i < count ; i++) { - if(mail_list[i].has_attachment) { - err_code = email_get_attachment_data_list(mail_list[i].mail_id, &mail_attach_info, &count); - if (EMAIL_ERROR_NONE == err_code) { - err_code = email_delete_attachment(mail_attach_info->attachment_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email delete attachment : success\n"); - tet_result(TET_PASS); - return ; - } - else { - tet_printf("Email delete attachment : Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - return ; - } - - }else { - tet_printf("Email get attachment data list : Failed err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - } - } -} - - -/*Testcase : uts_Email_Delete_Attachment_02 - TestObjective : To validate parmete for mailbox in delete a attachment from mail - APIs Tested : int email_delete_attachment(int attachment_id) - */ - -static void uts_Email_Delete_Attachment_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Delete_Attachment_02 Begin\n"); - - err_code = email_delete_attachment(0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete attachment : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete attachment : Failed \n"); - tet_result(TET_FAIL); - } - -} diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-attachment.h b/TC/TC_email_service/TC_Message/uts-email-delete-attachment.h deleted file mode 100755 index dae3441..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-attachment.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_Attachment_01(void); -static void uts_Email_Delete_Attachment_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Delete_Attachment_01, 1}, { uts_Email_Delete_Attachment_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-message.c b/TC/TC_email_service/TC_Message/uts-email-delete-message.c deleted file mode 100755 index bf277ac..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-message.c +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-delete-message.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Delete_Message_01 - TestObjective : To update message - APIs Tested : int email_delete_mail(int input_mailbox_id, int *input_mail_ids, int input_num, int input_from_server) - */ - -static void uts_Email_Delete_Message_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Delete_Message_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - count = 0; - err_code = uts_Email_Get_Mail_List_03(account[i].account_id, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - tet_printf("mail_list[i].mailbox_id[%d] mail_list[i].mail_id[%d]\n", mail_list[i].mailbox_id, mail_list[i].mail_id); - err_code = email_delete_mail(mail_list[i].mailbox_id, &mail_list[i].mail_id , 1, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email delete message : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete message failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - /* email_free_mail_list(&mail_list, count) */ - free(mail_list); - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - - -/*Testcase : uts_Email_Delete_Message_02 - TestObjective : To validate parameter for mailbox in delete message - APIs Tested : int email_delete_mail(int input_mailbox_id, int *input_mail_ids, int input_num, int input_from_server) - */ - -static void uts_Email_Delete_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 1; - - tet_infoline("uts_Email_delete_Message_02 Begin\n"); - - err_code = email_delete_mail(0, &mail_id , 1, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email delete message : failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Delete_Message_03 - TestObjective : To validate parameter for mail_id in delete message - APIs Tested : int email_delete_mail(int input_mailbox_id, int *input_mail_ids, int input_num, int input_from_server) - */ - -static void uts_Email_Delete_Message_03() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 0; - int count = 0; - email_mailbox_t *mail_box = NULL; - email_account_t *account = NULL; - - tet_infoline("uts_Email_delete_Message_03 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - count = 0; - err_code = email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &mail_box); - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("email_get_mailbox_by_mailbox_type : failed\n"); - tet_result(TET_UNRESOLVED); - } - - err_code = email_delete_mail(mail_box->mailbox_id, &mail_id , 1, 0); - - if (mail_box) { - email_free_mailbox(&mail_box, 1); - mail_box = NULL; - } - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email delete message : failed \n"); - tet_result(TET_FAIL); - } - } - }else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-delete-message.h b/TC/TC_email_service/TC_Message/uts-email-delete-message.h deleted file mode 100755 index e7e29ba..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-delete-message.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_Message_01(void); -static void uts_Email_Delete_Message_02(void); -static void uts_Email_Delete_Message_03(void); - - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Delete_Message_01, 1}, { uts_Email_Delete_Message_02, 2}, { uts_Email_Delete_Message_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.c b/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.c deleted file mode 100755 index 182616b..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.c +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-attachment-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Free_Attachment_Info_01 - TestObjective : Free mail attachment - APIs Tested : int email_free_attachment_data(email_attachment_data_t **attachment_data_list, int attachment_data_count) - */ - -static void uts_Email_Free_Attachment_Info_01() -{ - int err_code = EMAIL_ERROR_NONE; - int i = 0; - char att_pos[10]; - email_attachment_data_t *mail_attach_info = NULL; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - email_account_t *account = NULL ; - email_attachment_data_t *test_attachment_data_list = NULL; - int test_attachment_data_count = 0; - - - tet_infoline("uts_Email_Free_Attachment_Info_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - g_accountId = account[i].account_id; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - for (i = 0 ; i < count ; i++) { - err_code = email_get_attachment_data_list(mail_list[i].mail_id, &test_attachment_data_list, &test_attachment_data_count); - if (EMAIL_ERROR_NONE == err_code) { - if (test_attachment_data_count > 0) { - - if(test_attachment_data_list) - err_code = email_free_attachment_data(&test_attachment_data_list, test_attachment_data_count); - - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email free attachment info : success\n"); - tet_result(TET_PASS); - return; - } - else { - tet_printf("Email free attachment info : Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - return; - } - } - } - } - - tet_printf("uts_Email_Free_Attachment_Info_01 End\n"); - tet_result(TET_UNRESOLVED); -} - - -/*Testcase : uts_Email_Free_Attachment_Info_02 - TestObjective : Validate Parameter for Free mail attachment - APIs Tested : int email_free_attachment_data(email_attachment_data_t **attachment_data_list, int attachment_data_count) - */ - -static void uts_Email_Free_Attachment_Info_02() -{ - int err_code = EMAIL_ERROR_NONE; - int attachment_data_count = 0; - - tet_infoline("uts_Email_Free_Attachment_Info_02 Begin\n"); - - err_code = email_free_attachment_data(NULL, attachment_data_count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email free attachment info : success\n"); - tet_result(TET_PASS); - return; - } - else { - tet_printf("Email free attachment info : Failed \n"); - tet_result(TET_FAIL); - return; - } - -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.h b/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.h deleted file mode 100755 index a38e8bb..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-attachment-info.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Attachment_Info_01(void); -static void uts_Email_Free_Attachment_Info_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Attachment_Info_01, 1}, { uts_Email_Free_Attachment_Info_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-body-info.c b/TC/TC_email_service/TC_Message/uts-email-free-body-info.c deleted file mode 100755 index c0c721a..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-body-info.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-body-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Free_Body_Info_01 - TestObjective : To Free mail info - APIs Tested : int email_free_body_info(emf_mail_body_t **body_list, int count) - */ - -static void uts_Email_Free_Body_Info_01() -{ - int err_code = EMF_ERROR_NONE; - int i = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_body_t *pMail_body = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("uts_Email_Free_Body_Info_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - g_accountId = account[i].account_id; - mbox.account_id = g_accountId ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - for (i = 0; i < count; i++) { - if (mail_list[i].is_text_downloaded) { - tet_printf("email_get_body_info() : idx[%d], mail id[%d]\n", i, mail_list[i].mail_id); - err_code = email_get_body_info(&mbox, mail_list[i].mail_id , &pMail_body); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail body info : success\n"); - err_code = email_free_body_info(&pMail_body , 1); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email free mail body info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail body info : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } - return; - } - else { - tet_printf("Email get mail body info : Failed err_code[%d] \n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - } - } - if (i >= count) { - tet_infoline("No Mail which has a body\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Free_Body_Info_02 - TestObjective : To validate parameter for free mail body info - APIs Tested : int email_free_body_info(emf_mail_body_t **body_list, int count) - */ - -static void uts_Email_Free_Body_Info_02() -{ - int err_code = EMF_ERROR_NONE; - emf_mail_body_t *pMail_body = NULL; - - tet_infoline("utc_Email_Free_Body_Info_02 Begin\n"); - - err_code = email_free_body_info(NULL , 1); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email free mail body info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail body info : Failed \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-body-info.h b/TC/TC_email_service/TC_Message/uts-email-free-body-info.h deleted file mode 100755 index 0bde2c1..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-body-info.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Body_Info_01(void); -static void uts_Email_Free_Body_Info_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Body_Info_01, 1}, { uts_Email_Free_Body_Info_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-header-info.c b/TC/TC_email_service/TC_Message/uts-email-free-header-info.c deleted file mode 100755 index 7df0534..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-header-info.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-header-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Free_Header_Info_01 - TestObjective : To Free mail header info - APIs Tested : int email_free_header_info(emf_mail_head_t **head_list, int count) - */ - -static void uts_Email_Free_Header_Info_01() -{ - int err_code = EMF_ERROR_NONE; - int i = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_head_t *pMail_head = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Free_Header_Info_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - g_accountId = account[i].account_id; - mbox.account_id = g_accountId ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - err_code = email_get_header_info(&mbox, mail_list[i].mail_id , &pMail_head); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail info : success\n"); - err_code = email_free_header_info(&pMail_head , 1); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email free mail header info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail header info : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } - - } - else { - tet_printf("Email get mail info : Failed err_code[%d] \n", err_code); - tet_result(TET_UNRESOLVED); - } - - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Free_Header_Info_02 - TestObjective : To validate parameter for free mail header info - APIs Tested : int email_free_header_info(emf_mail_head_t **head_list, int count) - */ - -static void uts_Email_Free_Header_Info_02() -{ - int err_code = EMF_ERROR_NONE; - emf_mail_head_t *pMail_head = NULL; - - tet_infoline("utc_Email_Free_Mail_Header_Info_02 Begin\n"); - - err_code = email_free_header_info(NULL , 1); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email free mail header info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail header info : Failed \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-header-info.h b/TC/TC_email_service/TC_Message/uts-email-free-header-info.h deleted file mode 100755 index e0c0a45..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-header-info.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Header_Info_01(void); -static void uts_Email_Free_Header_Info_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Header_Info_01, 1}, { uts_Email_Free_Header_Info_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail-info.c b/TC/TC_email_service/TC_Message/uts-email-free-mail-info.c deleted file mode 100755 index d34380d..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail-info.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-mail-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Free_Mail_Info_01 - TestObjective : To Free mail info - APIs Tested : int email_free_mail_data(email_mail_data_t** mail_list, int count) - */ - -static void uts_Email_Free_Mail_Info_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mail_data_t *mail_data = NULL; - email_mail_list_item_t *mail_list = NULL; - email_account_t *account = NULL ; - - - tet_infoline("uts_Email_Free_Mail_Info_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - err_code = email_get_mail_data(mail_list[0].mail_id, &mail_data); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail info : success\n"); - err_code = email_free_mail_data(&mail_data, 1); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email free mail info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail info : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } - - } - else { - tet_printf("Email get mail data : Failed err_code[%d] \n", err_code); - tet_result(TET_UNRESOLVED); - } - - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Free_Mail_Info_02 - TestObjective : To validate parameter for free mail info - APIs Tested : int email_free_mail_data(email_mail_data_t** mail_list, int count) - */ - -static void uts_Email_Free_Mail_Info_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_mail_data_t *mail_data = NULL; - - tet_infoline("uts_Email_Free_Mail_Info_02 Begin\n"); - - err_code = email_free_mail_data(NULL, 1); - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email free mail info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail info : Failed \n"); - tet_result(TET_FAIL); - } - -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail-info.h b/TC/TC_email_service/TC_Message/uts-email-free-mail-info.h deleted file mode 100755 index ba33330..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail-info.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Mail_Info_01(void); -static void uts_Email_Free_Mail_Info_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Mail_Info_01, 1}, { uts_Email_Free_Mail_Info_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail-list.c b/TC/TC_email_service/TC_Message/uts-email-free-mail-list.c deleted file mode 100755 index 221809c..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail-list.c +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-mail-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Free_Mail_List_01 - TestObjective : To Free the MailList Information - APIs Tested : int email_free_mail_list(email_mail_list_item_t **mail_list, int count) - */ - -static void uts_Email_Free_Mail_List_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Free_Mail_List_01\n"); - - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - -/* err_code = email_free_mail_list(&mail_list , count) */ - free(mail_list); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email free Mail list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail list failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - -/*Testcase : uts_Email_Free_Mail_List_02 - TestObjective : To validate parameter for mail_list in Free the MailList Information - APIs Tested : int email_free_mail_list(email_mail_list_item_t **mail_list, int count) - */ - -static void uts_Email_Free_Mail_List_02() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 1; - - tet_infoline("uts_Email_Free_Mail_List_02\n"); - - err_code = email_free_mail_list(NULL, count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email free mail list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free Mail list failed : \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail-list.h b/TC/TC_email_service/TC_Message/uts-email-free-mail-list.h deleted file mode 100755 index cdf5e4e..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail-list.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Mail_List_01(void); -static void uts_Email_Free_Mail_List_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Mail_List_01, 1}, { uts_Email_Free_Mail_List_02, 2}, {NULL, 0} - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail.c b/TC/TC_email_service/TC_Message/uts-email-free-mail.c deleted file mode 100755 index c6fe4a9..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail.c +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-mail.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Free_Mail_01 - TestObjective : To Free mail - APIs Tested : int email_free_mail(emf_mail_t **mail_list, int count) - */ - -static void uts_Email_Free_Mail_01() -{ - int err_code = EMF_ERROR_NONE; - int i = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_t *pMail = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Free_Mail_Info_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mbox.account_id = account[0].account_id ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mail(&mbox, mail_list[i].mail_id , &pMail); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email get mail info : Failed err_code[%d] \n", err_code); - tet_result(TET_UNRESOLVED); - return ; - } - err_code = email_free_mail(&pMail , 1); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email free mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Free_Mail_02 - TestObjective : To validate parameter for free mail - APIs Tested : int email_free_mail(emf_mail_t **mail_list, int count) - */ - -static void uts_Email_Free_Mail_02() -{ - int err_code = EMF_ERROR_NONE; - - tet_infoline("utc_Email_Free_Mail_02 Begin\n"); - - err_code = email_free_mail(NULL , 1); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email free mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free mail : Failed \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mail.h b/TC/TC_email_service/TC_Message/uts-email-free-mail.h deleted file mode 100755 index af7e904..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mail.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Mail_01(void); -static void uts_Email_Free_Mail_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Mail_01, 1}, { uts_Email_Free_Mail_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mailbox.c b/TC/TC_email_service/TC_Message/uts-email-free-mailbox.c deleted file mode 100755 index a83ab8e..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mailbox.c +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-mailbox.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Free_Mailbox_01 - TestObjective : Free allocated memory for mailbox information. - APIs Tested : int email_free_mailbox(email_mailbox_t **mailbox_list, int count) - */ - -static void uts_Email_Free_Mailbox_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mailbox_t *mbox; - email_account_t *account = NULL ; - - - tet_infoline("utc_Email_Free_Mailbox_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mailbox_list(account[0].account_id, 1, &mbox, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Mailbox List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - - } - err_code = email_free_mailbox(&mbox, count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email freeMailbox : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email freet Mailbox : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Free_Mailbox_02 - TestObjective : validate parameter Free allocated memory for mailbox information. - APIs Tested : int email_free_mailbox(email_mailbox_t **mailbox_list, int count) - */ - -static void uts_Email_Free_Mailbox_02() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 1; - - tet_infoline("utc_Email_Free_Mailbox_02 Begin\n"); - - err_code = email_free_mailbox(NULL, count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Free Mailbox : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Free Mailbox : Failed \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-mailbox.h b/TC/TC_email_service/TC_Message/uts-email-free-mailbox.h deleted file mode 100755 index 286d105..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-mailbox.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Mailbox_01(void); -static void uts_Email_Free_Mailbox_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Mailbox_01, 1}, { uts_Email_Free_Mailbox_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-sender-list.c b/TC/TC_email_service/TC_Message/uts-email-free-sender-list.c deleted file mode 100755 index 795f7f8..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-sender-list.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-sender-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Free_Sender_List_01 - TestObjective : To free the sender list - APIs Tested : int email_free_sender_list(emf_sender_list_t **sender_list, int count) - */ - -static void uts_Email_Free_Sender_List_01() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sorting = 0; - int account_id = 0; - int sender_count = 0; - emf_sender_list_t *sender_list = NULL; - - tet_infoline("uts_Email_Free_Sender_List_01 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_get_sender_list(account_id , MailBox_name, EMF_SEARCH_FILTER_NONE, NULL, sorting , &sender_list , &sender_count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get sender list Success\n"); - if (sender_list) { - err_code = email_free_sender_list(&sender_list, sender_count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email free sender list success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free sender list Failed : err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_infoline("No sender list success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get sender list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - - -/*Testcase : uts_Email_Free_Sender_List_02 - TestObjective : To validate parameter for sender_list in free sender list - APIs Tested : int email_free_sender_list(emf_sender_list_t **sender_list, int count) - */ - -static void uts_Email_Free_Sender_List_02() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sender_count = 2; - int sorting; - emf_sender_list_t *sender_list = NULL; - - tet_infoline("uts_Email_Free_Sender_List_02 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_free_sender_list(NULL , sender_count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email free sender list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email free sender list failed\n"); - tet_result(TET_FAIL); - } - -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-free-sender-list.h b/TC/TC_email_service/TC_Message/uts-email-free-sender-list.h deleted file mode 100755 index 28dd7da..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-free-sender-list.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Sender_List_01(void); -static void uts_Email_Free_Sender_List_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Free_Sender_List_01, 1}, { uts_Email_Free_Sender_List_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.c b/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.c deleted file mode 100755 index fe1e4e1..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.c +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-attachment-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Attachment_Info_01 - TestObjective : Get a mail attachment - APIs Tested : int email_get_attachment_data_list(int input_mail_id, email_attachment_data_t **output_attachment_data, int *output_attachment_count) - */ - -static void uts_Email_Get_Attachment_Info_01() -{ - int err_code = EMAIL_ERROR_NONE; - int i = 0; - email_attachment_data_t *mail_attach_info = NULL; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - email_account_t *account = NULL ; - - tet_infoline("uts_Email_Get_Attachment_Info_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - g_accountId = account[i].account_id; - - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - for (i ; i < count ; i++) { - if(mail_list[i].has_attachment) { - err_code = email_get_attachment_data_list(mail_list[i].mail_id, &mail_attach_info, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get attachment info : success\n"); - tet_result(TET_PASS); - return; - }else { - tet_printf("Email get attachment info : Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - return; - } - } - } -} - - -/*Testcase : uts_Email_Get_Attachment_Info_02 - TestObjective : Validate Parameter for mailbox in Get a mail attachment - APIs Tested : int email_get_attachment_data_list(int input_mail_id, email_attachment_data_t **output_attachment_data, int *output_attachment_count) - */ - -static void uts_Email_Get_Attachment_Info_02() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 1; - email_attachment_data_t *mail_attach_info = NULL; - int count = 0; - - tet_infoline("uts_Email_Get_Attachment_Info_02 Begin\n"); - - err_code = email_get_attachment_data_list(0, &mail_attach_info, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get attachment info : success\n"); - tet_result(TET_PASS); - return; - } - else { - tet_printf("Email get attachment info : Failed \n"); - tet_result(TET_FAIL); - return; - } - -} - -/*Testcase : uts_Email_Get_Attachment_Info_03 - TestObjective : Validate Parameter for mailbox account_id in Get a mail attachment - APIs Tested : int email_get_attachment_data_list(int input_mail_id, email_attachment_data_t **output_attachment_data, int *output_attachment_count) - */ - -static void uts_Email_Get_Attachment_Info_03() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 1; - email_mailbox_t mbox; - int count = 0; - - tet_infoline("uts_Email_Get_Attachment_Info_03 Begin\n"); - - err_code = email_get_attachment_data_list(1, NULL, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get attachment info : success\n"); - tet_result(TET_PASS); - return; - } - else { - tet_printf("Email get attachment info : Failed \n"); - tet_result(TET_FAIL); - return; - } - -} - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.h b/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.h deleted file mode 100755 index 9ddb2a1..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-attachment-info.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Attachment_Info_01(void); -static void uts_Email_Get_Attachment_Info_02(void); -static void uts_Email_Get_Attachment_Info_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Attachment_Info_01, 1}, { uts_Email_Get_Attachment_Info_02, 2}, { uts_Email_Get_Attachment_Info_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-body-info.c b/TC/TC_email_service/TC_Message/uts-email-get-body-info.c deleted file mode 100755 index 2f999ff..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-body-info.c +++ /dev/null @@ -1,282 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-body-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - for (i = 0; i < count; i++) { - if (mail_list[i].is_text_downloaded) { - break; - } - } - if (i >= count) { - /* No mail which has a body -> Add new messag */ - tet_printf("Add new email 1 \n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email 2\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Body_Info_01 - TestObjective : To get mail body info - APIs Tested : int email_get_body_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_body_t **body) - */ - -static void uts_Email_Get_Body_Info_01() -{ - int err_code = EMF_ERROR_NONE; - int i = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_body_t *pMail_body = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Get_Body_Info_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - g_accountId = account[i].account_id; - mbox.account_id = g_accountId ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - for (i = 0; i < count; i++) { - if (mail_list[i].is_text_downloaded) { - tet_printf("email_get_body_info() : idx[%d], mail id[%d]\n", i, mail_list[i].mail_id); - err_code = email_get_body_info(&mbox, mail_list[i].mail_id , &pMail_body); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail body info : success\n"); - tet_result(TET_PASS); - return; - } - else { - tet_printf("Email get mail body info : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - return; - } - } - } - if (i >= count) { - tet_infoline("No Mail which has a body\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Get_Body_Info_02 - TestObjective : To validate parameter for mailbox in get mail info - APIs Tested : int email_get_body_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_body_t **body) - */ - -static void uts_Email_Get_Body_Info_02() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 1; - emf_mail_body_t *pMail_body = NULL; - - tet_infoline("utc_Email_Get_Body_Info_02 Begin\n"); - - err_code = email_get_body_info(NULL, mail_id , &pMail_body); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail body info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail body info : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Body_Info_03 - TestObjective : To validate parameter for mail_id in get mail body info - APIs Tested : int email_get_body_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_body_t **body) - */ - -static void uts_Email_Get_Body_Info_03() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 0; - emf_mailbox_t mbox; - emf_mail_body_t *pMail_body = NULL; - - tet_infoline("utc_Email_Get_Body_Info_03 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - mbox.account_id = g_accountId ; - - err_code = email_get_body_info(&mbox, mail_id , &pMail_body); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail body info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail body info : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Body_Info_04 - TestObjective : To validate parameter for body in get mail body info - APIs Tested : int email_get_body_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_body_t **body) - */ - -static void uts_Email_Get_Body_Info_04() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 1; - emf_mailbox_t mbox; - - tet_infoline("uts_Email_Get_Body_Info_04 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - mbox.account_id = g_accountId ; - - err_code = email_get_body_info(&mbox, mail_id , NULL); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail body info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail body info : Failed \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-body-info.h b/TC/TC_email_service/TC_Message/uts-email-get-body-info.h deleted file mode 100755 index 376daab..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-body-info.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Body_Info_01(void); -static void uts_Email_Get_Body_Info_02(void); -static void uts_Email_Get_Body_Info_03(void); -static void uts_Email_Get_Body_Info_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Body_Info_01, 1}, { uts_Email_Get_Body_Info_02, 2}, { uts_Email_Get_Body_Info_03, 3}, { uts_Email_Get_Body_Info_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.c b/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.c deleted file mode 100755 index 2868be0..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-disk-space-usage.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Disk_Space_Usage_01 - TestObjective : To get the total disk usage of emails - APIs Tested : int email_get_disk_space_usage(unsigned long *total_size) - */ - -static void uts_Email_Get_Disk_Space_Usage_01() -{ - int err_code = EMAIL_ERROR_NONE; - unsigned long total_size = 0; - - tet_infoline("uts_Email_Get_Disk_Space_Usage_01 Begin\n"); - - err_code = email_get_disk_space_usage(&total_size); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Get Disk Space Usage success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Disk Space Usage Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Get_Disk Space_Usage_02 - TestObjective : To validate parameter for total_size in get disk space usage - APIs Tested : int email_get_disk_space_usage(unsigned long *total_size) - */ - -static void uts_Email_Get_Disk_Space_Usage_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Get_Disk_Space_Usage_02 Begin\n"); - - err_code = email_get_disk_space_usage(0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Get Disk Space Usage Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Disk Space Usage failed\n"); - tet_result(TET_FAIL); - } - -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.h b/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.h deleted file mode 100755 index 3f48772..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-disk-space-usage.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Disk_Space_Usage_01(void); -static void uts_Email_Get_Disk_Space_Usage_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - {uts_Email_Get_Disk_Space_Usage_01, 1}, {uts_Email_Get_Disk_Space_Usage_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-header-info.c b/TC/TC_email_service/TC_Message/uts-email-get-header-info.c deleted file mode 100755 index 35a0805..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-header-info.c +++ /dev/null @@ -1,256 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-header-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Header_Info_01 - TestObjective : To get mail header info - APIs Tested : int email_get_header_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_head_t **head) - */ - -static void uts_Email_Get_Header_Info_01() -{ - int err_code = EMF_ERROR_NONE; - int i = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_head_t *pMail_head = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("utc_Email_Get_Info_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - g_accountId = account[i].account_id; - mbox.account_id = g_accountId ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - err_code = email_get_header_info(&mbox, mail_list[i].mail_id , &pMail_head); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail head info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail head info : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } - - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Get_Header_Info_02 - TestObjective : To validate parameter for mailbox in get mail Header info - APIs Tested : int email_get_header_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_head_t **head) - */ - -static void uts_Email_Get_Header_Info_02() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 1; - emf_mail_head_t *pMail_head = NULL; - - tet_infoline("utc_Email_Get_Header_Info_02 Begin\n"); - - err_code = email_get_header_info(NULL, mail_id , &pMail_head); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail header info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail header info : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Header_Info_03 - TestObjective : To validate parameter for mail_id in get mail header info - APIs Tested : int email_get_header_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_head_t **head) - */ - -static void uts_Email_Get_Header_Info_03() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 0; - emf_mailbox_t mbox; - emf_mail_head_t *pMail_head = NULL; - - tet_infoline("utc_Email_Get_Header_Info_03 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - mbox.account_id = g_accountId ; - - err_code = email_get_header_info(&mbox, mail_id , &pMail_head); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail header info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail header info : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Header_Info_04 - TestObjective : To validate parameter for info in get mail header info - APIs Tested : int email_get_header_info(emf_mailbox_t *mailbox, int mail_id, emf_mail_head_t **head) - */ - -static void uts_Email_Get_Header_Info_04() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 1; - emf_mailbox_t mbox; - - tet_infoline("uts_Email_Get_Header_Info_04 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - mbox.account_id = g_accountId ; - - err_code = email_get_info(&mbox, mail_id , NULL); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mail Header info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail Header info : Failed \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-header-info.h b/TC/TC_email_service/TC_Message/uts-email-get-header-info.h deleted file mode 100755 index ffdb484..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-header-info.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Header_Info_01(void); -static void uts_Email_Get_Header_Info_02(void); -static void uts_Email_Get_Header_Info_03(void); -static void uts_Email_Get_Header_Info_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Header_Info_01, 1}, { uts_Email_Get_Header_Info_02, 2}, { uts_Email_Get_Header_Info_03, 3}, { uts_Email_Get_Header_Info_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-info.c b/TC/TC_email_service/TC_Message/uts-email-get-info.c deleted file mode 100755 index 37abaa4..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-info.c +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-info.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Info_01 - TestObjective : To get mail info - APIs Tested : int email_get_mail_data(int input_mail_id, email_mail_data_t **output_mail_data) - */ - -static void uts_Email_Get_Info_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mail_data_t *mail_data = NULL; - email_mail_list_item_t *mail_list = NULL; - email_account_t *account = NULL ; - - tet_infoline("utc_Email_Get_Info_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - g_accountId = account[0].account_id; - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - err_code = email_get_mail_data(mail_list[0].mail_id , &mail_data); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail data : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail data : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } - - } - else { - tet_infoline("No Mails in mailbox\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list : Failed err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - -/*Testcase : uts_Email_Get_Info_02 - TestObjective : To validate parameter for mailbox in get mail info - APIs Tested : int email_get_info(email_mailbox_t *mailbox, int mail_id, email_mail_info_t **info) - */ - -static void uts_Email_Get_Info_02() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = -1; - email_mail_data_t *mail_data = NULL; - - tet_infoline("utc_Email_Get_Info_02 Begin\n"); - - err_code = email_get_mail_data(mail_id , &mail_data); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mail data : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail data : Failed \n"); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Info_03 - TestObjective : To validate parameter for mail_id in get mail info - APIs Tested : int email_get_info(email_mailbox_t *mailbox, int mail_id, email_mail_info_t **info) - */ - -static void uts_Email_Get_Info_03() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("utc_Email_Get_Info_03 Begin\n"); - - err_code = email_get_mail_data(1 , NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mail info : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail info : Failed \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-info.h b/TC/TC_email_service/TC_Message/uts-email-get-info.h deleted file mode 100755 index c6d1105..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-info.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Info_01(void); -static void uts_Email_Get_Info_02(void); -static void uts_Email_Get_Info_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Info_01, 1}, { uts_Email_Get_Info_02, 2}, { uts_Email_Get_Info_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.c b/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.c deleted file mode 100755 index afcaca7..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-latest-unread-mail-id.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Latest_Unread_Mail_Id_01 - TestObjective : To get the latest unread mail id of given account - APIs Tested : int email_get_latest_unread_mail_id(int account_id, int *pMailID) - */ - -static void uts_Email_Get_Latest_Unread_Mail_Id_01() -{ - int err_code = EMF_ERROR_NONE; - int account_id = -1; - int mail_id = 0; - - tet_infoline("uts_Email_Get_Latest_Unread_Mail_Id_01 Begin\n"); - - err_code = email_get_latest_unread_mail_id(account_id, &mail_id); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get Latest Unread mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get Latest Unread mail id failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Get_Latest_Unread_Mail_Id_02 - TestObjective : To validate parameter for account_id in get the latest unread mail id of given account - APIs Tested : int email_get_latest_unread_mail_id(int account_id, int *pMailID) - */ - -static void uts_Email_Get_Latest_Unread_Mail_Id_02() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 0; - - tet_infoline("uts_Email_Get_Latest_Unread_Mail_Id_02 Begin\n"); - - err_code = email_get_latest_unread_mail_id(0, &mail_id); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get latest Unread mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email get latest Unread mail id Failed\n"); - tet_result(TET_FAIL); - } - -} - - - -/*Testcase : uts_Email_Get_Latest_Unread_Mail_Id_03 - TestObjective : To validate parameter for pMailID in get the latest unread mail id of given account - APIs Tested : int email_get_latest_unread_mail_id(int account_id, int *pMailID) - */ - -static void uts_Email_Get_Latest_Unread_Mail_Id_03() -{ - int err_code = EMF_ERROR_NONE; - int account_id = 0; - - tet_infoline("uts_Email_Get_Latest_Unread_Mail_Id_03 Begin\n"); - - err_code = email_get_latest_unread_mail_id(account_id, 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get latest Unread mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email get latest Unread mail id Failed\n"); - tet_result(TET_FAIL); - } - -} diff --git a/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.h b/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.h deleted file mode 100755 index 406dffd..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-latest-unread-mail-id.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Latest_Unread_Mail_Id_01(void); -static void uts_Email_Get_Latest_Unread_Mail_Id_02(void); -static void uts_Email_Get_Latest_Unread_Mail_Id_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Latest_Unread_Mail_Id_01, 1}, { uts_Email_Get_Latest_Unread_Mail_Id_02, 2}, { uts_Email_Get_Latest_Unread_Mail_Id_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.c b/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.c deleted file mode 100755 index 0691804..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.c +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mail-flag.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mail_Flag_01 - TestObjective : Get the Mail Flag - APIs Tested : int email_get_mail_flag(int account_id, int mail_id, emf_mail_flag_t *mail_flag) - */ - -static void uts_Email_Get_Mail_Flag_01() -{ - int err_code = EMF_ERROR_NONE; - char *pMailboxName; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_flag_t mail_flag = {0, };; - - tet_infoline("uts_Email_Get_Mail_Flag_01\n"); - - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - pMailboxName = strdup("INBOX"); - count = 0 ; - err_code = email_get_mail_list(pAccount[i].account_id, pMailboxName, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - if (count > 0) { - err_code = email_get_mail_flag(pAccount[i].account_id , mail_list[i].mail_id , &mail_flag); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail by server mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail by server mail id failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -/* email_free_mail_list(&mail_list, count) */ - free(mail_list); - } - else { - tet_infoline("No mail found\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_infoline("No email account found : Success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Get_Mail_Flag_02 - TestObjective : To validate parameter for account_id in Get the Mail Flag - APIs Tested : int email_get_mail_flag(int account_id, int mail_id, emf_mail_flag_t *mail_flag) - */ - -static void uts_Email_Get_Mail_Flag_02() -{ - int err_code = EMF_ERROR_NONE; - int account_id = -1; - int mail_id = 1 ; - emf_mail_flag_t mail_flag = {0, }; - - tet_infoline("uts_Email_Get_Mail_Flag_02\n"); - - err_code = email_get_mail_flag(account_id, mail_id, &mail_flag); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Get Mail Flag Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mail Flag failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mail_Flag_03 - TestObjective : To validate parameter for mail_id in Get the Mail Flag - APIs Tested : int email_get_mail_flag(int account_id, int mail_id, emf_mail_flag_t *mail_flag) - */ - -static void uts_Email_Get_Mail_Flag_03() -{ - int err_code = EMF_ERROR_NONE; - int account_id = 1; - int mail_id = -1 ; - emf_mail_flag_t mail_flag = {0, }; - - tet_infoline("uts_Email_Get_Mail_Flag_03\n"); - - err_code = email_get_mail_flag(account_id, mail_id, &mail_flag); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Get Mail Flag Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mail Flag failed : \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Get_Mail_Flag_04 - TestObjective : To validate parameter for account_id in Get the Mail Flag - APIs Tested : int email_get_mail_flag(int account_id, int mail_id, emf_mail_flag_t *mail_flag) - */ - -static void uts_Email_Get_Mail_Flag_04() -{ - int err_code = EMF_ERROR_NONE; - int account_id = 1; - int mail_id = 1 ; - emf_mail_flag_t mail_flag = {0, }; - - tet_infoline("uts_Email_Get_Mail_Flag_04\n"); - - err_code = email_get_mail_flag(account_id, mail_id, NULL); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Get Mail Flag Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mail Flag failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.h b/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.h deleted file mode 100755 index f75baba..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail-flag.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mail_Flag_01(void); -static void uts_Email_Get_Mail_Flag_02(void); -static void uts_Email_Get_Mail_Flag_03(void); -static void uts_Email_Get_Mail_Flag_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - {uts_Email_Get_Mail_Flag_01, 1}, {uts_Email_Get_Mail_Flag_02, 2}, {uts_Email_Get_Mail_Flag_03, 3}, {uts_Email_Get_Mail_Flag_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.c b/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.c deleted file mode 100755 index 3b29dcd..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mail-list-ex.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mail_List_Ex_01 - TestObjective : Get the Mail List information from DB based on the mailbox mailbox_name - APIs Tested : int email_get_mail_list_ex(email_list_filter_t *input_filter_list, int input_filter_count, email_list_sorting_rule_t *input_sorting_rule_list, - int input_sorting_rule_count, int input_start_index, int input_limit_count, email_mail_list_item_t** output_mail_list, int *output_result_count) - */ - -static void uts_Email_Get_Mail_List_Ex_01() -{ - int err_code = EMAIL_ERROR_NONE; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - int start_index = 0; - int limit_count = 2; - email_list_filter_t *filter_list = NULL; - - tet_infoline("uts_Email_Get_Mail_Ex_01\n"); - - filter_list = malloc(sizeof(email_list_filter_t) * 1); - memset(filter_list, 0 , sizeof(email_list_filter_t) * 1); - - filter_list[0].list_filter_item_type = EMAIL_LIST_FILTER_ITEM_RULE; - filter_list[0].list_filter_item.rule.target_attribute = EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE; - filter_list[0].list_filter_item.rule.rule_type = EMAIL_LIST_FILTER_RULE_EQUAL; - filter_list[0].list_filter_item.rule.key_value.integer_type_value = EMAIL_MAILBOX_TYPE_INBOX; - filter_list[0].list_filter_item.rule.case_sensitivity = false; - - err_code = email_get_mail_list_ex(filter_list, 1, NULL, 0, start_index, limit_count, &mail_list , &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list ex Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail list ex failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_list_filter(&filter_list, 1); -} - - -/*Testcase : uts_Email_Get_Mail_List_Ex_02 - TestObjective : Validate parameter for mail_list in Get the Mail List information from DB based on the mailbox mailbox_name - APIs Tested : email_get_mail_list_ex(int account_id , const char *mailbox_mailbox_name, int thread_id, int start_index, int limit_count, email_sort_type_t sorting, - email_mail_list_item_t **mail_list, int *result_count) - */ -static void uts_Email_Get_Mail_List_Ex_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - int start_index = 0; - int limit_count = 2; - - tet_infoline("uts_Email_Get_Mail_Ex_02\n"); - - count = 0; - err_code = email_get_mail_list_ex(NULL, 1, NULL, 0, start_index, limit_count, &mail_list , &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mail list ex Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail list ex failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - -/*Testcase : uts_Email_Get_Mail_List_Ex_03 - TestObjective : Validate parameter for result_count in Get the Mail List information from DB based on the mailbox mailbox_name - APIs Tested : email_get_mail_list_ex(int account_id , const char *mailbox_mailbox_name, int thread_id, int start_index, int limit_count, email_sort_type_t sorting, - email_mail_list_item_t **mail_list, int *result_count) - */ - -static void uts_Email_Get_Mail_List_Ex_03() -{ - int err_code = EMAIL_ERROR_NONE; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - int start_index = 0; - int limit_count = 2 ; - email_list_filter_t *filter_list = NULL; - - tet_infoline("uts_Email_Get_Mail_Ex_03\n"); - - - filter_list = malloc(sizeof(email_list_filter_t) * 1); - memset(filter_list, 0 , sizeof(email_list_filter_t) * 1); - - filter_list[0].list_filter_item_type = EMAIL_LIST_FILTER_ITEM_RULE; - filter_list[0].list_filter_item.rule.target_attribute = EMAIL_MAIL_ATTRIBUTE_MAILBOX_TYPE; - filter_list[0].list_filter_item.rule.rule_type = EMAIL_LIST_FILTER_RULE_EQUAL; - filter_list[0].list_filter_item.rule.key_value.integer_type_value = EMAIL_MAILBOX_TYPE_INBOX; - filter_list[0].list_filter_item.rule.case_sensitivity = false; - count = 0; - err_code = email_get_mail_list_ex(filter_list, 1, NULL, 0, start_index, limit_count, &mail_list , 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get mail list ex Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail list ex failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - - email_free_list_filter(&filter_list, 1); - -} - - - - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.h b/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.h deleted file mode 100755 index a12b2e2..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail-list-ex.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mail_List_Ex_01(void); -static void uts_Email_Get_Mail_List_Ex_02(void); -static void uts_Email_Get_Mail_List_Ex_03(void); - - - - - - -struct tet_testlist tet_testlist[] = { - {uts_Email_Get_Mail_List_Ex_01, 1}, {uts_Email_Get_Mail_List_Ex_02, 2}, {uts_Email_Get_Mail_List_Ex_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail-list.h b/TC/TC_email_service/TC_Message/uts-email-get-mail-list.h deleted file mode 100755 index e829d82..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail-list.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mail_List_01(void); -static void uts_Email_Get_Mail_List_02(void); -static void uts_Email_Get_Mail_List_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - {uts_Email_Get_Mail_List_01, 1}, {uts_Email_Get_Mail_List_02, 2}, {uts_Email_Get_Mail_List_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail.c b/TC/TC_email_service/TC_Message/uts-email-get-mail.c deleted file mode 100755 index 4c91d73..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail.c +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mail.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mail_01 - TestObjective : To Get mail - APIs Tested : int email_get_mail(emf_mailbox_t *mailbox, int mail_id, emf_mail_t **mail) - */ - -static void uts_Email_Get_Mail_01() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_t *pMail = NULL; - emf_account_t *account = NULL ; - - - tet_infoline("utc_EmailGet_Mail_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &count); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mbox.account_id = account[0].account_id ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mail(&mbox, mail_list[0].mail_id , &pMail); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mail : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mail_02 - TestObjective : To validate parameter mail_id for Get mail - APIs Tested : int email_get_mail(emf_mailbox_t *mailbox, int mail_id, emf_mail_t **mail) - */ - -static void uts_Email_Get_Mail_02() -{ - int err_code = EMF_ERROR_NONE; - emf_mail_t *pMail = NULL; - emf_mailbox_t mbox; - - tet_infoline("utc_Email_Get_Mail_02 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_mail(&mbox, 0 , &pMail); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Get mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get mail : Failed \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mail.h b/TC/TC_email_service/TC_Message/uts-email-get-mail.h deleted file mode 100755 index e22a7a5..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mail.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mail_01(void); -static void uts_Email_Get_Mail_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Mail_01, 1}, { uts_Email_Get_Mail_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.c b/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.c deleted file mode 100755 index 453df69..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.c +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mailbox-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mailbox_List_01 - TestObjective : To Get all mailboxes from account. - APIs Tested : int email_get_mailbox_list(int account_id, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mailbox_t *mbox; - int mailbox_sync_type = 1; - email_account_t *account = NULL ; - - - tet_infoline("utc_Email_Get_Mailbox_List_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mailbox_list(account[0].account_id, mailbox_sync_type, &mbox, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Get Mailbox List : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mailbox List : Failed err_code[%d] \n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_List_02 - TestObjective : To validate parameter for account_id in Get all mailboxes from account. - APIs Tested : int email_get_mailbox_list(int account_id, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_02() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mailbox_t *mbox; - int account_id = -1 ; - - tet_infoline("utc_Email_Get_Mailbox_List_02 Begin\n"); - - err_code = email_get_mailbox_list(account_id, 1, &mbox, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Get Mailbox List : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mailbox List : Failed \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_List_03 - TestObjective : To validate parameter for mailbox_list in Get all mailboxes from account. - APIs Tested : int email_get_mailbox_list(int account_id, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_03() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_account_t *account = NULL ; - - - tet_infoline("utc_Email_Get_Mailbox_List_03 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mailbox_list(account[0].account_id, 1, NULL, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Get Mailbox List : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mailbox List : Failed \n"); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Get_Mailbox_List_04 - TestObjective : To validate parameter for Get all mailboxes from account. - APIs Tested : int email_get_mailbox_list(int account_id, email_mailbox_t **mailbox_list, int *count) - */ - -static void uts_Email_Get_Mailbox_List_04() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - email_mailbox_t *mbox; - email_account_t *account = NULL ; - - - tet_infoline("utc_Email_Get_Mailbox_List_04 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mailbox_list(account[0].account_id, 1, &mbox, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Get Mailbox List : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Mailbox List : Failed \n"); - tet_result(TET_FAIL); - } -} - - - - - - - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.h b/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.h deleted file mode 100755 index 232a3a7..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-list.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mailbox_List_01(void); -static void uts_Email_Get_Mailbox_List_02(void); -static void uts_Email_Get_Mailbox_List_03(void); -static void uts_Email_Get_Mailbox_List_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Mailbox_List_01, 1}, { uts_Email_Get_Mailbox_List_02, 2}, { uts_Email_Get_Mailbox_List_03, 3}, { uts_Email_Get_Mailbox_List_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.c b/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.c deleted file mode 100755 index 1752b8b..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.c +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-mailbox-name-by-mail-id.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Mailbox_Name_By_Mail_Id_01 - TestObjective : To get mailBox naem by mailID - APIs Tested : int email_get_mailbox_name_by_mail_id(int mail_id, char **pMailbox_name) - */ - -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_01() -{ - int err_code = EMF_ERROR_NONE; - char *pMailboxName = NULL; - int mail_id = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_t *pMail = NULL; - emf_account_t *account = NULL ; - int account_count = 0; - int count = 0; - - - tet_infoline("uts_Email_Get_Mailbox_Name_By_Mail_Id_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - err_code = email_get_account_list(&account, &account_count); - if (EMF_ERROR_NONE != err_code || account_count <= 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mbox.account_id = account[0].account_id ; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count <= 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mail_id = mail_list[0].mail_id; - err_code = email_get_mailbox_name_by_mail_id(mail_id , &pMailboxName); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get Mailbox Name By Mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get Mailbox Name By Mail id Failed\n"); - tet_result(TET_FAIL); - } - - email_free_account(&account, account_count); -/* email_free_mail_list(&mail_list, count) */ - free(mail_list); - if (pMailboxName) - free(pMailboxName); -} - - -/*Testcase : uts_Email_Get_Mailbox_Name_By_Mail_Id_02 - TestObjective : To validate parameter for mail_id in get mailbox name by mailID - APIs Tested : int email_get_mailbox_name_by_mail_id(int mail_id, char **pMailbox_name) - */ - -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_02() -{ - int err_code = EMF_ERROR_NONE; - char *pMailboxName = NULL; - int mail_id = -1; - - tet_infoline("uts_Email_Get_Mailbox_Name_By_Mail_Id_02 Begin\n"); - - err_code = email_get_mailbox_name_by_mail_id(mail_id, &pMailboxName); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox name by Mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox name by mail id failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Mailbox_Name_By_Mail_Id_03 - TestObjective : To validate parameter for pMailbox_name in get mailbox name by mailID - APIs Tested : int email_get_mailbox_name_by_mail_id(int mail_id, char **pMailbox_name) - */ - -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_03() -{ - int err_code = EMF_ERROR_NONE; - char *pMailboxName = NULL; - int mail_id = 1; - - tet_infoline("uts_Email_Get_Mailbox_Name_By_Mail_Id_03 Begin\n"); - - err_code = email_get_mailbox_name_by_mail_id(mail_id, NULL); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get mailbox name by Mail id Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get mailbox name by mail id failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.h b/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.h deleted file mode 100755 index c93ceec..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-mailbox-name-by-mail-id.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_01(void); -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_02(void); -static void uts_Email_Get_Mailbox_Name_By_Mail_Id_03(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Mailbox_Name_By_Mail_Id_01, 1}, { uts_Email_Get_Mailbox_Name_By_Mail_Id_02, 2}, { uts_Email_Get_Mailbox_Name_By_Mail_Id_03, 3}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.c b/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.c deleted file mode 100755 index d31d1c4..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.c +++ /dev/null @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-max-mail-count.h" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Max_Mail_Count_01 - TestObjective : To get the maximum count of emails - APIs Tested : int email_get_max_mail_count(int *Count) - */ - -static void uts_Email_Get_Max_Mail_Count_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - - tet_infoline("uts_Email_Get_Max_Mail_Count_01 Begin\n"); - - err_code = email_get_max_mail_count(&count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Get Max Mail Count success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Max Mail Count Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Max_Mail_Count_02 - TestObjective : validate parameter - APIs Tested : int email_get_max_mail_count(int *Count) - */ - -static void uts_Email_Get_Max_Mail_Count_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Get_Max_Mail_Count_01 Begin\n"); - - err_code = email_get_max_mail_count(NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Get Max Mail Count success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Get Max Mail Count Failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.h b/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.h deleted file mode 100755 index 1b96032..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-max-mail-count.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Max_Mail_Count_01(void); -static void uts_Email_Get_Max_Mail_Count_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Max_Mail_Count_01, 1}, { uts_Email_Get_Max_Mail_Count_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-sender-list.c b/TC/TC_email_service/TC_Message/uts-email-get-sender-list.c deleted file mode 100755 index f034aa3..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-sender-list.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-sender-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) - tet_printf("email_get_mail_list() success\n"); - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - else - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - else - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Sender_List_01 - TestObjective : To get the sender list - APIs Tested : int email_get_sender_list(int account_id, const char *mailbox_name, int search_type, char *search_value, emf_sort_type_t sorting, emf_sender_list_t** sender_list, int *sender_count) - */ - -static void uts_Email_Get_Sender_List_01() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sorting = 0; - int account_id = 0; - int sender_count = 0; - emf_sender_list_t *sender_list = NULL; - - tet_infoline("uts_Email_Get_Sender_List_01 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_get_sender_list(account_id , MailBox_name, EMF_SEARCH_FILTER_NONE, NULL, sorting , &sender_list , &sender_count); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email get sender list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get sender list failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - -/*Testcase : uts_Email_Get_Sender_List_02 - TestObjective : To validate parameter for account_id in get the sender list - APIs Tested : int email_get_sender_list(int account_id, const char *mailbox_name, int search_type, char *search_value, emf_sort_type_t sorting, emf_sender_list_t** sender_list, int *sender_count) - */ - -static void uts_Email_Get_Sender_List_02() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sorting = 0; - int account_id = -1; /* check thi */ - int sender_count = 0; - emf_sender_list_t *sender_list = NULL; - - tet_infoline("uts_Email_Get_Sender_List_02 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_get_sender_list(account_id , MailBox_name , EMF_SEARCH_FILTER_NONE, NULL, sorting , &sender_list , &sender_count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get sender list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get sender list failed\n"); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Sender_List_03 - TestObjective : To validate parameter for sender_list in get the sender list - APIs Tested : int email_get_sender_list(int account_id, const char *mailbox_name, int search_type, char *search_value, emf_sort_type_t sorting, emf_sender_list_t** sender_list, int *sender_count) - */ - -static void uts_Email_Get_Sender_List_03() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sorting = 0; - int account_id = 0; - int sender_count = 0; - - tet_infoline("uts_Email_Get_Sender_List_03 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_get_sender_list(account_id , MailBox_name , EMF_SEARCH_FILTER_NONE, NULL, sorting , NULL , &sender_count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get sender list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get sender list failed\n"); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Get_Sender_List_04 - TestObjective : To validate parameter for sender_count in get the sender list - APIs Tested : int email_get_sender_list(int account_id, const char *mailbox_name, int search_type, char *search_value, emf_sort_type_t sorting, emf_sender_list_t** sender_list, int *sender_count) - */ - -static void uts_Email_Get_Sender_List_04() -{ - char *MailBox_name = NULL; - int err_code = EMF_ERROR_NONE; - int sorting = 0; - int account_id = 0; - emf_sender_list_t *sender_list = NULL; - - tet_infoline("uts_Email_Get_Sender_List_04 Begin\n"); - - sorting = EMF_SORT_DATETIME_HIGH; - err_code = email_get_sender_list(account_id , MailBox_name , EMF_SEARCH_FILTER_NONE, NULL, sorting , &sender_list , 0); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email get sender list Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get sender list failed\n"); - tet_result(TET_FAIL); - } - -} diff --git a/TC/TC_email_service/TC_Message/uts-email-get-sender-list.h b/TC/TC_email_service/TC_Message/uts-email-get-sender-list.h deleted file mode 100755 index 39bda26..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-sender-list.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Sender_List_01(void); -static void uts_Email_Get_Sender_List_02(void); -static void uts_Email_Get_Sender_List_03(void); -static void uts_Email_Get_Sender_List_04(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Sender_List_01, 1}, { uts_Email_Get_Sender_List_02, 2}, { uts_Email_Get_Sender_List_03, 3}, { uts_Email_Get_Sender_List_04, 4}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-get-thread-information.h b/TC/TC_email_service/TC_Message/uts-email-get-thread-information.h deleted file mode 100755 index 778b93a..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-get-thread-information.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Thread_Information_01(void); -static void uts_Email_Get_Thread_Information_02(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Get_Thread_Information_01, 1}, { uts_Email_Get_Thread_Information_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.c b/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.c deleted file mode 100755 index 8cc0dab..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.c +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-modify-extra-mail-flag.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Modify_Extra_Mail_Flag_01 - TestObjective : To modify mail extra flags - APIs Tested : int email_modify_extra_mail_flag(int mail_id, emf_extra_flag_t new_flag) - */ - -static void uts_Email_Modify_Extra_Mail_Flag_01() -{ - int err_code = EMF_ERROR_NONE; - emf_extra_flag_t new_flag ; - int mail_id = 0; - int flag = 0xff; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - memcpy(&new_flag, &flag, sizeof(emf_extra_flag_t)); - - tet_infoline("uts_Email_Modify_Extra_Mail_Flag_01 Begin\n"); - - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.account_id = g_accountId; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mail_id = mail_list[0].mail_id; - err_code = email_modify_extra_mail_flag(mail_id, new_flag); - if (EMF_ERROR_NONE == err_code) { - tet_printf("Email Modify Extra Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Extra Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Modify_Extra_Mail_Flag_02 - TestObjective : To validate parameter for modify mail extra flag - APIs Tested : int email_modify_extra_mail_flag(int mail_id, emf_extra_flag_t new_flag) - */ -static void uts_Email_Modify_Extra_Mail_Flag_02() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 0; /* Invalid mail id*/ - emf_extra_flag_t new_flag ; - int flag = 0xff; - memcpy(&new_flag, &flag, sizeof(emf_extra_flag_t)); - - - tet_infoline("uts_Email_Modify_Extra_Mail_Flag_02 Begin\n"); - - - err_code = email_modify_extra_mail_flag(mail_id, new_flag); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Extra Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Extra Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - tet_infoline("uts_Email_Modify_Extra_Mail_Flag_02 End\n"); -} - diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.h b/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.h deleted file mode 100755 index ddfd8b9..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-extra-mail-flag.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Message.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Modify_Extra_Mail_Flag_01(void); -static void uts_Email_Modify_Extra_Mail_Flag_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Modify_Extra_Mail_Flag_01, 1}, { uts_Email_Modify_Extra_Mail_Flag_02, 2}, {NULL, 0} - -}; diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.c b/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.c deleted file mode 100755 index b7b4f63..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.c +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-modify-mail-flag.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Modify_Mail_Flag_01 - TestObjective : To modify mail flags - APIs Tested : int email_modify_mail_flag(int mail_id, emf_mail_flag_t new_flag, int onserver) - */ - -static void uts_Email_Modify_Mail_Flag_01() -{ - int err_code = EMF_ERROR_NONE; - emf_mail_flag_t new_flag; - int mail_id = 0; - int flag = 0xff; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - memcpy(&new_flag, &flag, sizeof(emf_mail_flag_t)); - - int onserver = 0; - - tet_infoline("uts_Email_Modify_Mail_Flag_01 Begin\n"); - - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.account_id = g_accountId; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mail_id = mail_list[0].mail_id; - err_code = email_modify_mail_flag(mail_id, new_flag, onserver); - if (EMF_ERROR_NONE == err_code) { - tet_printf("Email Modify Mail Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Mail Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Modify_Mail_Flag_02 - TestObjective : To validate parameter for modify mail flag - APIs Tested : int email_modify_mail_flag(int mail_id, emf_mail_flag_t new_flag, int onserver) - */ -static void uts_Email_Modify_Mail_Flag_02() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 0; /* Invalid valu */ - emf_mail_flag_t new_flag; - int flag = 0xff; - memcpy(&new_flag, &flag, sizeof(emf_mail_flag_t)); - int onserver = 0; - - tet_infoline("uts_Email_Modify_Mail_Flag_02 Begin\n"); - - - err_code = email_modify_mail_flag(mail_id, new_flag, onserver); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Mail Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Mail Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Modify_Mail_Flag_03 - TestObjective : To validate parameter for modify mail flag - APIs Tested : int email_modify_mail_flag(int mail_id, emf_mail_flag_t new_flag, int onserver) - */ -static void uts_Email_Modify_Mail_Flag_03() -{ - int err_code = EMF_ERROR_NONE; - int mail_id = 1; - emf_mail_flag_t new_flag; - int flag = 0xff; - memcpy(&new_flag, &flag, sizeof(emf_mail_flag_t)); - int onserver = -1; /* Should not make any difference as this parameter is ignored */ /* Invalid valu */ - - tet_infoline("uts_Email_Modify_Mail_Flag_02 Begin\n"); - - - err_code = email_modify_mail_flag(mail_id, new_flag, onserver); - /* Should not make any difference as this parameter is ignored */ - tet_printf("Email Modify Mail Flag success\n"); - tet_result(TET_PASS); - -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.h b/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.h deleted file mode 100755 index 4b3e543..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-mail-flag.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Message.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Modify_Mail_Flag_01(void); -static void uts_Email_Modify_Mail_Flag_02(void); -static void uts_Email_Modify_Mail_Flag_03(void); - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Modify_Mail_Flag_01, 1}, { uts_Email_Modify_Mail_Flag_02, 2}, { uts_Email_Modify_Mail_Flag_03, 3}, {NULL, 0} - -}; diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-seen-flag.h b/TC/TC_email_service/TC_Message/uts-email-modify-seen-flag.h deleted file mode 100755 index cd4b0bc..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-seen-flag.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Message.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Modify_Seen_Flag_01(void); -static void uts_Email_Modify_Seen_Flag_02(void); -static void uts_Email_Modify_Seen_Flag_03(void); -static void uts_Email_Modify_Seen_Flag_04(void); -static void uts_Email_Modify_Seen_Flag_05(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Modify_Seen_Flag_01, 1}, { uts_Email_Modify_Seen_Flag_02, 2}, { uts_Email_Modify_Seen_Flag_03, 3}, { uts_Email_Modify_Seen_Flag_04, 4}, { uts_Email_Modify_Seen_Flag_05, 5}, {NULL, 0} - -}; diff --git a/TC/TC_email_service/TC_Message/uts-email-modify-seen_flag.c b/TC/TC_email_service/TC_Message/uts-email-modify-seen_flag.c deleted file mode 100755 index 3ffda30..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-modify-seen_flag.c +++ /dev/null @@ -1,268 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-modify-seen-flag.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMF_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMF_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = NULL; /* for all mailboxe */ - mbox.account_id = ALL_ACCOUNT; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMF_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMF_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Modify_Seen_Flag_01 - TestObjective : To modify mail seen flags - APIs Tested : int email_modify_seen_flag(int mail_ids[], int num, int seen_flag, int onserver) - */ - -static void uts_Email_Modify_Seen_Flag_01() -{ - int err_code = EMF_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 0; - int seen_flag = 1; /* Set Seen flag */ - int onserver = 0; - int count = 0; - emf_mailbox_t mbox; - emf_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Modify_Seen_Flag_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.account_id = g_accountId; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - mail_ids[0] = mail_list[0].mail_id; - num = 1; - - - err_code = email_modify_seen_flag(mail_ids, num, seen_flag, onserver); - if (EMF_ERROR_NONE == err_code) { - tet_printf("Email Modify Seen Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Seen Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - -/*Testcase : uts_Email_Modify_Seen_Flag_02 - TestObjective : To validate parameter for modify mail seen flag - APIs Tested : int email_modify_seen_flag(int mail_ids[], int num, int seen_flag, int onserver) - */ -static void uts_Email_Modify_Seen_Flag_02() -{ - int err_code = EMF_ERROR_NONE; - int *mail_ids = NULL; /* mail_ids is initialized to NULL*/ - int num = 2; - int seen_flag = 1; /* Set Seen flag */ - int onserver = 0; - - - tet_infoline("uts_Email_Modify_Seen_Flag_02 Begin\n"); - - - err_code = email_modify_seen_flag(mail_ids, num, seen_flag, onserver); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Seen Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Seen Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Modify_Seen_Flag_03 - TestObjective : To validate parameter for modify mail seen flag - APIs Tested : int email_modify_seen_flag(int mail_ids[], int num, int seen_flag, int onserver) - */ -static void uts_Email_Modify_Seen_Flag_03() -{ - int err_code = EMF_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 0; /* Check of boundary condition */ - int seen_flag = 1; /* Set Seen flag */ - int onserver = 0; - - - tet_infoline("uts_Email_Modify_Seen_Flag_03 Begin\n"); - - - err_code = email_modify_seen_flag(mail_ids, num, seen_flag, onserver); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Seen Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Seen Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - -/*Testcase : uts_Email_Modify_Seen_Flag_04 - TestObjective : To validate parameter for modify mail seen flag - APIs Tested : int email_modify_seen_flag(int mail_ids[], int num, int seen_flag, int onserver) - */ -static void uts_Email_Modify_Seen_Flag_04() - -{ - int err_code = EMF_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 2; - int seen_flag = -1; - int onserver = 0; - - - tet_infoline("uts_Email_Modify_Seen_Flag_04 Begin\n"); - - - err_code = email_modify_seen_flag(mail_ids, num, seen_flag, onserver); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Seen Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Seen Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Modify_Seen_Flag_05 - TestObjective : To validate parameter for modify mail seen flag - APIs Tested : int email_modify_seen_flag(int mail_ids[], int num, int seen_flag, int onserver) - */ -static void uts_Email_Modify_Seen_Flag_05() - -{ - int err_code = EMF_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 2; - int seen_flag = 1; /* Set seen flag */ - int onserver = -1; - - - tet_infoline("uts_Email_Modify_Seen_Flag_05 Begin\n"); - - - err_code = email_modify_seen_flag(mail_ids, num, seen_flag, onserver); - if (EMF_ERROR_NONE != err_code) { - tet_printf("Email Modify Seen Flag success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Modify Seen Flag failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.c b/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.c deleted file mode 100755 index ed0d990..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.c +++ /dev/null @@ -1,249 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-move-all-mails-to-folder.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Move_All_Mails_To_Folder_01 - TestObjective : To move all mails to a mailbox - APIs Tested : int email_move_all_mails_to_mailbox(int input_source_mailbox_id, int input_target_mailbox_id) - - */ - -static void uts_Email_Move_All_Mails_To_Folder_01() -{ - int err_code = EMAIL_ERROR_NONE; - - email_mailbox_t *src_mailbox = NULL; - email_mailbox_t *new_mailbox = NULL; - email_account_t *account = NULL; - int count = 0; - - tet_infoline("uts_Email_Move_All_Mails_To_Folder_01 Begin\n"); - if (!email_get_account_list(&account, &count) || NULL == account || count <= 0) { - tet_printf("Email Move All Mails To mailbox failed in account list fetch\n"); - tet_result(TET_UNRESOLVED); - return; - } - - err_code = email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &src_mailbox); - if(err_code != EMAIL_ERROR_NONE) { - tet_printf("email_get_mailbox_by_mailbox_type failed in uts_Email_Move_All_Mails_To_Folder_01\n"); - tet_result(TET_UNRESOLVED); - return; - } - err_code = email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_TRASH, &new_mailbox); - if(err_code != EMAIL_ERROR_NONE) { - tet_printf("email_get_mailbox_by_mailbox_type failed in uts_Email_Move_All_Mails_To_Folder_01\n"); - tet_result(TET_UNRESOLVED); - return; - } - - err_code = email_move_all_mails_to_mailbox(src_mailbox->mailbox_id, new_mailbox->mailbox_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email Move All Mails To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move All Mails To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - - if (account && count > 0) { - email_free_account(&account, count); - } - - if (src_mailbox) { - email_free_mailbox(&src_mailbox, 1); - src_mailbox = NULL; - } - if (new_mailbox) { - email_free_mailbox(&new_mailbox, 1); - new_mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Move_All_Mails_To_Folder_02 - TestObjective : To validate parameter for all mail move to mailbox - APIs Tested : int email_move_all_mails_to_mailbox(int input_source_mailbox_id, int input_target_mailbox_id) - - */ -static void uts_Email_Move_All_Mails_To_Folder_02() -{ - int err_code = EMAIL_ERROR_NONE; - - int src_mailbox_id = 0; /* src_mailbox is 0 */ - email_mailbox_t *new_mailbox = NULL; - email_account_t *account = NULL; - int count = 0; - - tet_infoline("uts_Email_Move_All_Mails_To_Folder_02 Begin\n"); - if (!email_get_account_list(&account, &count) || NULL == account || count <= 0) { - tet_printf("Email Move All Mails To mailbox failed in account list fetch\n"); - tet_result(TET_UNRESOLVED); - return; - } - email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_TRASH, &new_mailbox); - - err_code = email_move_all_mails_to_mailbox(src_mailbox_id, new_mailbox->mailbox_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email Move All Mails To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move All Mails To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - - if (account && count > 0) { - email_free_account(&account, count); - } - if (new_mailbox) { - email_free_mailbox(&new_mailbox, 1); - new_mailbox = NULL; - } - -} - -/*Testcase : uts_Email_Move_All_Mails_To_Folder_03 - TestObjective : To validate parameter for all mail move to mailbox - APIs Tested : int email_move_all_mails_to_mailbox(int input_source_mailbox_id, int input_target_mailbox_id) - - */ -static void uts_Email_Move_All_Mails_To_Folder_03() -{ - - int err_code = EMAIL_ERROR_NONE; - - email_mailbox_t *src_mailbox = NULL; - int new_mailbox_id = 0; /* Destination mailbox is 0 */ - email_account_t *account = NULL; - int count = 0; - - tet_infoline("uts_Email_Move_All_Mails_To_Folder_03 Begin\n"); - if (!email_get_account_list(&account, &count) || NULL == account || count <= 0) { - tet_printf("Email Move All Mails To mailbox failed in account list fetch\n"); - tet_result(TET_UNRESOLVED); - return; - } - email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &src_mailbox); - - err_code = email_move_all_mails_to_mailbox(src_mailbox->mailbox_id, new_mailbox_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email Move All Mails To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move All Mails To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - - if (account && count > 0) { - email_free_account(&account, count); - } - if (src_mailbox) { - email_free_mailbox(&src_mailbox, 1); - src_mailbox = NULL; - } -} - - diff --git a/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.h b/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.h deleted file mode 100755 index 9e53696..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-move-all-mails-to-folder.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-mail.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Move_All_Mails_To_Folder_01(void); -static void uts_Email_Move_All_Mails_To_Folder_02(void); -static void uts_Email_Move_All_Mails_To_Folder_03(void); - - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Move_All_Mails_To_Folder_01, 1}, { uts_Email_Move_All_Mails_To_Folder_02, 2}, { uts_Email_Move_All_Mails_To_Folder_03, 3}, {NULL, 0} - -}; diff --git a/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.c b/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.c deleted file mode 100755 index aae0429..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.c +++ /dev/null @@ -1,264 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-move-mail-to-folder.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - -/*Testcase : uts_Email_Move_Mail_To_Folder_01 - TestObjective : To move mails to a mailbox - APIs Tested : int email_move_mail_to_mailbox(int *mail_ids, int num, int input_target_mailbox_id) - */ - -static void uts_Email_Move_Mail_To_Folder_01() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 0; - int new_mailbox_id = 0; - int count = 0; - email_mailbox_t mbox; - email_mail_list_item_t *mail_list = NULL; - int mailbox_type = EMAIL_MAILBOX_TYPE_TRASH; - email_mailbox_t *pMailbox = NULL; - - tet_infoline("uts_Email_Move_Mail_To_Folder_01 Begin\n"); - - if (g_accountId <= 0) { - tet_infoline("g_accountId is invalid\n"); - tet_result(TET_UNRESOLVED); - } - - count = 0; - err_code = uts_Email_Get_Mail_List_03(g_accountId, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("uts_Email_Get_Mail_List_03 Failed : err_code[%d]", err_code); - tet_result(TET_UNRESOLVED); - return; - } - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , mailbox_type, &pMailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - mail_ids[0] = mail_list[0].mail_id; - num = 1; - new_mailbox_id = pMailbox->mailbox_id; - - tet_printf("New mailbox : new_mailbox_id[%d]\n", new_mailbox_id); - - err_code = email_move_mail_to_mailbox(mail_ids, num, new_mailbox_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email Move Mail To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move Mail To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (pMailbox) { - email_free_mailbox(&pMailbox, 1); - pMailbox = NULL; - } - -} - - -/*Testcase : uts_Email_Move_Mail_To_Folder_02 - TestObjective : To validate parameter for mail move to mailbox - APIs Tested : int email_move_mail_to_mailbox(int *mail_ids, int num, int input_target_mailbox_id) - */ -static void uts_Email_Move_Mail_To_Folder_02() -{ - int err_code = EMAIL_ERROR_NONE; - int *mail_ids = NULL; /* mail ids initialized to NULL*/ - int num = 2; - email_mailbox_t *pMailbox = NULL; - int count = 0; - - tet_infoline("uts_Email_Move_Mail_To_Folder_02 Begin\n"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , EMAIL_MAILBOX_TYPE_TRASH, &pMailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - err_code = email_move_mail_to_mailbox(mail_ids, num, pMailbox->mailbox_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email Move Mail To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move Mail To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (pMailbox) { - email_free_mailbox(&pMailbox, 1); - pMailbox = NULL; - } -} - -/*Testcase : uts_Email_Move_Mail_To_Folder_03 - TestObjective : To validate parameter for mail move to mailbox - APIs Tested : int email_move_mail_to_mailbox(int *mail_ids, int num, int input_target_mailbox_id) - */ -static void uts_Email_Move_Mail_To_Folder_03() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = -1; /* Boundary condition test */ - email_mailbox_t *pMailbox = NULL; - int count = 0; - - tet_infoline("uts_Email_Move_Mail_To_Folder_03 Begin\n"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , EMAIL_MAILBOX_TYPE_TRASH, &pMailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - err_code = email_move_mail_to_mailbox(mail_ids, num, pMailbox->mailbox_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email Move Mail To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move Mail To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (pMailbox) { - email_free_mailbox(&pMailbox, 1); - pMailbox = NULL; - } -} - -/*Testcase : uts_Email_Move_Mail_To_Folder_04 - TestObjective : To validate parameter for mail move to mailbox - APIs Tested : int email_move_mail_to_mailbox(int *mail_ids, int num, int input_target_mailbox_id) - */ -static void uts_Email_Move_Mail_To_Folder_04() - -{ - int err_code = EMAIL_ERROR_NONE; - int mail_ids[] = {1, 2}; - int num = 2; - int input_target_mailbox_id = 0; /* input_target_mailbox_id as 0 */ - - tet_infoline("uts_Email_Move_Mail_To_Folder_04 Begin\n"); - - err_code = email_move_mail_to_mailbox(mail_ids, num, input_target_mailbox_id); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email Move Mail To mailbox success\n"); - tet_result(TET_PASS); - } - else { - - tet_printf("Email Move Mail To mailbox failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.h b/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.h deleted file mode 100755 index 6f95eae..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-move-mail-to-folder.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-mail.h" - - - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Move_Mail_To_Folder_01(void); -static void uts_Email_Move_Mail_To_Folder_02(void); -static void uts_Email_Move_Mail_To_Folder_03(void); -static void uts_Email_Move_Mail_To_Folder_04(void); - - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Move_Mail_To_Folder_01, 1}, { uts_Email_Move_Mail_To_Folder_02, 2}, { uts_Email_Move_Mail_To_Folder_03, 3}, { uts_Email_Move_Mail_To_Folder_04, 4}, {NULL, 0} - -}; diff --git a/TC/TC_email_service/TC_Message/uts-email-release-mail.c b/TC/TC_email_service/TC_Message/uts-email-release-mail.c deleted file mode 100755 index f2a318c..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-release-mail.c +++ /dev/null @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-release-mail.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Release_Mail_01 - TestObjective : To Free the MailList Information - APIs Tested : int email_release_mail(emf_mail_list_item_t **mail_list, int count) - */ - -static void uts_Email_Release_Mail_01() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - emf_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Release_Mail_01\n"); - - err_code = email_get_mail_list(0, NULL, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - free(mail_list); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("Email Release Mail Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Release mail failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - -/*Testcase : uts_Email_Release_Mail_02 - TestObjective : To validate parameter for mail_list in Free the MailList Information - APIs Tested : int email_release_mail(emf_mail_list_item_t **mail_list, int count) - */ - -static void uts_Email_Release_Mail_02() -{ - int err_code = EMF_ERROR_NONE; - int count = 1; - - tet_infoline("uts_Email_Release_Mail_02\n"); - - err_code = email_release_mail(NULL, count); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("Email Release mail Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Release Mail failed : \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-release-mail.h b/TC/TC_email_service/TC_Message/uts-email-release-mail.h deleted file mode 100755 index 9acf0d6..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-release-mail.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Message.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Release_Mail_01(void); -static void uts_Email_Release_Mail_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Release_Mail_01, 1}, { uts_Email_Release_Mail_02, 2}, {NULL, 0} - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-send-retry.c b/TC/TC_email_service/TC_Message/uts-email-send-retry.c deleted file mode 100755 index 4a796eb..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-send-retry.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-send-retry.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Send_Retry_01 - TestObjective : To Retry mail send - APIs Tested : int email_retry_sending_mail(int mail_id, int timeout_in_sec) - */ - -static void uts_Email_Send_Retry_01() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Send_Retry_01\n"); - - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - if (count > 0) { - - err_code = email_retry_sending_mail(mail_list[i].mail_id , 3); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email Send Retry Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Send Retry failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_infoline("No mail found\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - -/*Testcase : uts_Email_Send_Retry_02 - TestObjective : To validate parameter for mail_id in Retry mail send - APIs Tested : int email_retry_sending_mail(int mail_id, int timeout_in_sec) - */ - -static void uts_Email_Send_Retry_02() -{ - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Send_Retry_02\n"); - - err_code = email_retry_sending_mail(-1, 2); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email Send Retry Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email Send Retry failed : \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Message/uts-email-send-retry.h b/TC/TC_email_service/TC_Message/uts-email-send-retry.h deleted file mode 100755 index 5f6fadd..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-send-retry.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Send_Retry_01(void); -static void uts_Email_Send_Retry_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Send_Retry_01, 1}, { uts_Email_Send_Retry_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Message/uts-email-update-message.c b/TC/TC_email_service/TC_Message/uts-email-update-message.c deleted file mode 100755 index 1b6f018..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-update-message.c +++ /dev/null @@ -1,199 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-update-message.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_printf("\n TC startup"); - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - - g_accountId = 0; - /* Check if there are any accounts and Get account id. If there is no account in the db, add new dummy account data to the d */ - err_code = email_get_account_list(&pAccount, &count); - if (EMAIL_ERROR_NONE == err_code) { - /* get the account id from the d */ - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else if (EMAIL_ERROR_ACCOUNT_NOT_FOUND == err_code) { - /* Add new dummy account to the db if there is no account in the d */ - tet_printf("Add new account\n"); - g_accountId = uts_Email_Add_Dummy_Account_01(); - tet_printf("g_accountId[%d]\n", g_accountId); - } - else { - tet_printf("email_get_account_list() failed : err_code[%d]\n", err_code); - } - - /* Check if there are any mails and Get mail id of one of them. If there is no mail in the db, add new dummy mail data to the d */ - count = 0; - err_code = uts_Email_Get_Mail_List_03(ALL_ACCOUNT, 0, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("email_get_mail_list() success\n"); - } - else if (EMAIL_ERROR_MAIL_NOT_FOUND == err_code) { - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Dummy_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Dummy_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Dummy_Message_02() failed : err_code[%d]\n", err_code); - } - } - else { - tet_printf("Email Get Mail List Failed : err_code[%d]", err_code); - } - } - else - tet_infoline("Email open DB failed\n"); - } - else { - tet_infoline("Email service not started\n"); - } -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Update_Message_01 - TestObjective : To update message - APIs Tested : int email_update_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t* input_meeting_request, int input_from_eas); - */ - -static void uts_Email_Update_Message_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int count = 0; - email_account_t *account = NULL ; - email_mail_list_item_t *mail_list = NULL; - email_mail_data_t *mail_data = NULL; - email_attachment_data_t *test_attachment_data_list = NULL; - email_meeting_request_t *meeting_req = NULL; - int test_attachment_data_count = 0; - - tet_infoline("uts_Email_Update_Message_01 Begin\n"); - - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get account list success\n"); - if (count > 0) { - count = 0; - err_code = uts_Email_Get_Mail_List_03(account[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - if (count > 0) { - err_code = email_get_mail_data(mail_list[0].mail_id , &mail_data); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail success\n"); - - mail_data->full_address_cc = strdup("samsungtest09@gmail.com"); - - err_code = email_update_mail(mail_data, NULL, 0, NULL, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("email_update_mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("email_update_mail failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_printf("Email get mail failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - } - } - else { - tet_printf("Email get mail list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -// email_free_mail_list(&mail_list, count) - free(mail_list); - } - else { - tet_infoline("NO email account found : success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get account list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -} - - -/*Testcase : uts_Email_Update_Message_02 - TestObjective : To validate parameter for mail_id in update message - APIs Tested : int email_update_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t* input_meeting_request, int input_from_eas); - */ - -static void uts_Email_Update_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - int mail_id = 0; - - tet_infoline("uts_Email_Update_Message_02 Begin\n"); - - err_code = email_update_mail(NULL, NULL, 0, NULL, 0); - - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email update message : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email update message : failed \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Message/uts-email-update-message.h b/TC/TC_email_service/TC_Message/uts-email-update-message.h deleted file mode 100755 index 280066e..0000000 --- a/TC/TC_email_service/TC_Message/uts-email-update-message.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Update_Message_01(void); -static void uts_Email_Update_Message_02(void); - - - - - -struct tet_testlist tet_testlist[] = { - { uts_Email_Update_Message_01, 1}, { uts_Email_Update_Message_02, 2}, {NULL, 0} - - -}; - diff --git a/TC/TC_email_service/TC_Network/Makefile b/TC/TC_email_service/TC_Network/Makefile deleted file mode 100755 index 388a8ef..0000000 --- a/TC/TC_email_service/TC_Network/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts_email_send_mail \ - uts_email_send_saved \ - uts_email_sync_header \ - uts_email_sync_header_for_all_account \ - uts_email_download_body \ - uts_email_download_attachment \ - uts_email_get_imap_folder_list \ - uts_email_cancel_job \ - uts_email_get_network_status \ - uts_email_get_pending_job \ - uts_email_sync_local_activity \ - -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = -I. `pkg-config --cflags $(PKGS)` -INCS += -I. `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_email_service/TC_Utility - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Network/tslist b/TC/TC_email_service/TC_Network/tslist deleted file mode 100755 index 072193d..0000000 --- a/TC/TC_email_service/TC_Network/tslist +++ /dev/null @@ -1,10 +0,0 @@ -uts_email_get_network_status -uts_email_get_pending_job -uts_email_send_mail -uts_email_send_saved -uts_email_sync_header -uts_email_sync_header_for_all_account -uts_email_download_body -uts_email_download_attachment -uts_email_get_imap_folder_list -uts_email_cancel_job diff --git a/TC/TC_email_service/TC_Network/uts_email_activate_pdp.c b/TC/TC_email_service/TC_Network/uts_email_activate_pdp.c deleted file mode 100755 index c7c87ed..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_activate_pdp.c +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_activate_pdp.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Activate_Pdp_01 - TestObjective : To activate pdp - APIs Tested : int email_activate_pdp(int thread_type) - */ - -static void uts_Email_Activate_Pdp_01() -{ - int err_code = EMAIL_ERROR_NONE; - int thread_type = 1; - - tet_infoline("uts_Email_Activate_Pdp_01 Begin\n"); - - err_code = email_activate_pdp(thread_type); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email activate pdp : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email activate pdp failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Activate_Pdp_02 - TestObjective : To validate parameter for activate pdp - APIs Tested : int email_activate_pdp(int thread_type) - */ - -static void uts_Email_Activate_Pdp_02() -{ - int err_code = EMAIL_ERROR_NONE; - int thread_type = -1; - - tet_infoline("uts_Email_Activate_pdp_01 Begin\n"); - - err_code = email_activate_pdp(thread_type); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email activate pdp : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email activate pdp failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_activate_pdp.h b/TC/TC_email_service/TC_Network/uts_email_activate_pdp.h deleted file mode 100755 index 638bd5c..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_activate_pdp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Activate_Pdp_01(void); -static void uts_Email_Activate_Pdp_02(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Activate_Pdp_01, 1}, {uts_Email_Activate_Pdp_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_cancel_job.c b/TC/TC_email_service/TC_Network/uts_email_cancel_job.c deleted file mode 100755 index ecb4271..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_cancel_job.c +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_cancel_job.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_email_cancel_job_01 - TestObjective : To cancel the ongoing job - APIs Tested : int email_cancel_job(int account_id, int handle) - */ - -static void uts_Email_Cancel_Job_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle = 0; - - tet_infoline("uts_Email_cancel_job_01 Begin\n"); - - err_code = email_sync_header_for_all_account(&handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync mail header for all account : success\n"); - err_code = email_cancel_job(0, handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email cancel job : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email cancel job failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_printf("Email sync mail header for all account failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - - -/*Testcase : uts_email_cancel_job_02 - TestObjective : To validate the parameter for account id in cancel the ongoing job - APIs Tested : int email_cancel_job(int account_id, int handle) - */ -static void uts_Email_Cancel_Job_02() -{ - int err_code = EMAIL_ERROR_NONE; - int account_id = -1; - int handle; - - tet_infoline("uts_Email_cancel_job_10 Begin\n"); - - err_code = email_sync_header_for_all_account(&handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync mail header for all account : success\n"); - err_code = email_cancel_job(account_id, handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email cancel job : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email cancel job failed : \n"); - tet_result(TET_FAIL); - } - } - else { - tet_printf("Email sync mail header for all account failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_cancel_job.h b/TC/TC_email_service/TC_Network/uts_email_cancel_job.h deleted file mode 100755 index 1d27d03..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_cancel_job.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Cancel_Job_01(void); -static void uts_Email_Cancel_Job_02(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Cancel_Job_01, 1}, {uts_Email_Cancel_Job_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.c b/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.c deleted file mode 100755 index e8baf6b..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.c +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_deactivate_pdp.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Deactivate_Pdp_01 - TestObjective : To Deactivate pdp - APIs Tested : int email_deactivate_pdp(int thread_type) - */ - -static void uts_Email_Deactivate_Pdp_01() -{ - int err_code = EMAIL_ERROR_NONE; - int thread_type = 1; - - tet_infoline("uts_Email_Deactivate_Pdp_01 Begin\n"); - - err_code = email_deactivate_pdp(thread_type); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email deactivate pdp : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email deactivate pdp failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Deactivate_Pdp_02 - TestObjective : To validate parameter for deactivate pdp - APIs Tested : int email_deactivate_pdp(int thread_type) - */ - -static void uts_Email_Deactivate_Pdp_02() -{ - int err_code = EMAIL_ERROR_NONE; - int thread_type = -1; - - tet_infoline("uts_Email_Deactivate_pdp_01 Begin\n"); - - err_code = email_deactivate_pdp(thread_type); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email deactivate pdp : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email deactivate pdp failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.h b/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.h deleted file mode 100755 index b25bdbd..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_deactivate_pdp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Deactivate_Pdp_01(void); -static void uts_Email_Deactivate_Pdp_02(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Deactivate_Pdp_01, 1}, {uts_Email_Deactivate_Pdp_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_download_attachment.c b/TC/TC_email_service/TC_Network/uts_email_download_attachment.c deleted file mode 100755 index eb23493..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_download_attachment.c +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_download_attachment.h" -#include "../TC_Utility/uts-email-real-utility.c" -#include "../TC_Utility/uts-email-dummy-utility.c" - -sqlite3 *sqlite_emmb; -int g_accountId; -int mail_id ; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - mail_id = uts_Email_Add_Real_Message_02(); - } - else { - g_accountId = pAccount[i].account_id; - mail_id = uts_Email_Add_Real_Message_02(); - - } - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_email_download_attachment_01 - TestObjective : To download attachment part of email - APIs Tested : int email_download_attachment(int mail_id, int nth, unsigned* handle) - */ -static void uts_Email_Download_Attachment_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int i = 0; - email_mail_list_item_t *mail_list = NULL; - int count = 0; - - tet_infoline("uts_Email_Download_Attachment_01 Begin\n"); - - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE != err_code || count < 0) { - tet_printf("Email Get Account List Failed : err_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return; - } - - for (i ; i < count ; i++) { - if(mail_list[i].has_attachment) { - err_code = email_download_attachment(mail_list[i].mail_id, 1, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email download mail attachment success\n"); - tet_result(TET_PASS); - return ; - } - else - { - tet_printf("Email download mail attachment failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - return; - } - } - } -} - - - -/*Testcase : uts_email_download_attachment_02 - TestObjective : To validate parameter account_id for email download attachment - APIs Tested : int email_download_attachment(int mail_id, int nth, unsigned* handle) - */ -static void uts_Email_Download_Attachment_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int mail_id = 0; /* validation fiel */ - - tet_infoline("uts_Email_Download_Attachment_02 Begin\n"); - - err_code = email_download_attachment(mail_id, 1, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email download mail attachment success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email download attachment failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - - -/*Testcase : uts_email_download_attachment_03 - TestObjective : To validate parameter mailbox for email download attachment - APIs Tested : int email_download_attachment(int mail_id, int nth, unsigned* handle) - */ -static void uts_Email_Download_Attachment_03() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - - tet_infoline("uts_Email_Download_Attachment_03 Begin\n"); - - - err_code = email_download_attachment(1, 0, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email download mail attachment success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email download attachment failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Network/uts_email_download_attachment.h b/TC/TC_email_service/TC_Network/uts_email_download_attachment.h deleted file mode 100755 index 3c14366..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_download_attachment.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Download_Attachment_01(void); -static void uts_Email_Download_Attachment_02(void); -static void uts_Email_Download_Attachment_03(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Download_Attachment_01, 1}, {uts_Email_Download_Attachment_02, 2}, {uts_Email_Download_Attachment_03, 3}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_download_body.c b/TC/TC_email_service/TC_Network/uts_email_download_body.c deleted file mode 100755 index c72bcb3..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_download_body.c +++ /dev/null @@ -1,217 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_download_body.h" -#include "../TC_Utility/uts-email-real-utility.c" -#include "../TC_Utility/uts-email-dummy-utility.c" - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - uts_Email_Add_Real_Message_02(); - } - else { - g_accountId = pAccount[i].account_id; - uts_Email_Add_Real_Message_02(); - } - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Download_Body_01 - TestObjective : To download email body - APIs Tested : int email_download_body(int mail_id, int with_attachment, unsigned* handle) - */ -static void uts_Email_Download_Body_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - email_mail_list_item_t *mail_list = NULL; - - tet_infoline("uts_Email_Download_Body_01 Begin\n"); - - err_code = uts_Email_Get_Mail_List_03(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mail_list, &count, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get mail list : success\n"); - for (i = 0 ;i - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Download_Body_01(void); -static void uts_Email_Download_Body_04(void); -static void uts_Email_Download_Body_03(void); -static void uts_Email_Download_Body_02(void); - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Download_Body_01, 1}, {uts_Email_Download_Body_02, 1}, {uts_Email_Download_Body_03, 1}, {uts_Email_Download_Body_04, 1}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.c b/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.c deleted file mode 100755 index 17ab4dc..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.c +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_get_imap_folder_list.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Get_Imap_Folder_List_01 - TestObjective : To get imap mailbox list - APIs Tested : int email_get_imap_mailbox_list(int account_id, unsigned *handle) - */ - -static void uts_Email_Get_Imap_Folder_List_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_account_t *account = NULL ; - int count = 0; - - tet_infoline("uts_email_get_imap_folder_list_01 Begin\n"); - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count <=0 ) { - tet_printf("email_get_account_list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - err_code = email_sync_imap_mailbox_list(account[0].account_id, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get Imap mailbox list : success\n "); - tet_result(TET_PASS); - } - else { - tet_printf("Email get Imap mailbox list : failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - -/*Testcase : uts_email_get_imap_folder_list_02 - TestObjective : To validate parametr for account_id in get imap mailbox list - APIs Tested : int email_get_imap_mailbox_list(int account_id, unsigned *handle) - */ - -static void uts_Email_Get_Imap_Folder_List_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int account_id = -1; - - - tet_infoline("uts_email_get_imap_folder_list_02 Begin\n"); - - - err_code = email_sync_imap_mailbox_list(account_id, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get Imap mailbox list : success\n "); - tet_result(TET_PASS); - } - else { - tet_printf("Email get Imap mailbox list : failed \n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.h b/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.h deleted file mode 100755 index 5b05ff3..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_imap_folder_list.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Get_Imap_Folder_List_01(void); -static void uts_Email_Get_Imap_Folder_List_02(void); - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Imap_Folder_List_01, 1}, {uts_Email_Get_Imap_Folder_List_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_get_network_status.c b/TC/TC_email_service/TC_Network/uts_email_get_network_status.c deleted file mode 100755 index e1b00d3..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_network_status.c +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_get_network_status.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Get_Network_Status_01 - TestObjective : To get network status - APIs Tested : int email_get_network_status(int *on_sending, int *on_receiving) - */ - -static void uts_Email_Get_Network_Status_01() -{ - int err_code = EMAIL_ERROR_NONE; - int on_sending = 0; - int on_receiving = 0; - - tet_infoline("uts_email_get_network_status_01 Begin\n"); - - err_code = email_get_network_status(&on_sending, &on_receiving); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email get Network status : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get Network status failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Network/uts_email_get_network_status.h b/TC/TC_email_service/TC_Network/uts_email_get_network_status.h deleted file mode 100755 index b9eeafc..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_network_status.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Get_Network_Status_01(void); - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Network_Status_01, 1}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_get_pending_job.c b/TC/TC_email_service/TC_Network/uts_email_get_pending_job.c deleted file mode 100755 index 72e2b23..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_pending_job.c +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_get_pending_job.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Get_Pending_job_01 - TestObjective : To get pending job list - APIs Tested : int email_get_pending_job(email_action_t action, int account_id, int mail_id, email_event_status_type_t *status) - */ - -static void uts_Email_Get_Pending_Job_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle = 0; - - tet_infoline("uts_Email_Get_pending_Job_01 Begin\n"); - - err_code = email_get_pending_job(EMAIL_ACTION_SEND_MAIL, g_accountId, 1, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_printf("Email get pending job : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get pending job failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Pending_Job_02 - TestObjective : To get pending job list - APIs Tested : int email_get_pending_job(email_action_t action, int account_id, int mail_id, email_event_status_type_t *status) - */ - -static void uts_Email_Get_Pending_Job_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle = 0; - int account_id = -1; - int mail_id = 1; - - tet_infoline("uts_Email_Get_Pending_Job_02 Begin\n"); - - err_code = email_get_pending_job(EMAIL_ACTION_SEND_MAIL, account_id, mail_id, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get pending job : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get pending job failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Pending_Job_03 - TestObjective : To get pending job list - APIs Tested : int email_get_pending_job(email_action_t action, int account_id, int mail_id, email_event_status_type_t *status) - */ - -static void uts_Email_Get_Pending_Job_03() -{ - int err_code = EMAIL_ERROR_NONE; - int handle = 0; - int account_id = -1 ; - int mail_id = 0; - - tet_infoline("uts_Email_Network_11 Begin\n"); - - err_code = email_get_pending_job(EMAIL_ACTION_SEND_MAIL, account_id , mail_id, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get pending job : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get pending job failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Network/uts_email_get_pending_job.h b/TC/TC_email_service/TC_Network/uts_email_get_pending_job.h deleted file mode 100755 index 66b8c1f..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_get_pending_job.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Get_Pending_Job_01(void); -static void uts_Email_Get_Pending_Job_02(void); -static void uts_Email_Get_Pending_Job_03(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Get_Pending_Job_01, 1}, {uts_Email_Get_Pending_Job_02, 2}, {uts_Email_Get_Pending_Job_03, 3}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_send_mail.c b/TC/TC_email_service/TC_Network/uts_email_send_mail.c deleted file mode 100755 index fa92bc8..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_mail.c +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_send_mail.h" -#include "../TC_Utility/uts-email-real-utility.c" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - tet_printf("Add new email\n"); - err_code = uts_Email_Add_Real_Message_02(); - if (EMAIL_ERROR_NONE == err_code) { /* Make db contain at least one mai */ - tet_printf("uts_Email_Add_Real_Message_02() success.\n"); - } - else { - tet_printf("uts_Email_Add_Real_Message_02() failed : err_code[%d]\n", err_code); - } - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - -/*Testcase : uts_Email_Send_Mail_01 - TestObjective : To send a mail - APIs Tested : int email_send_mail(int mail_id, email_option_t* sending_option, unsigned* handle) - */ - -static void uts_Email_Send_Mail_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_mail_data_t *test_mail_data = NULL; - email_attachment_data_t *attachment_data = NULL; - email_meeting_request_t *meeting_req = NULL; - - FILE *fp; - email_option_t option; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Send_Mail_01 Begin\n"); - - memset(&option, 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - test_mail_data = malloc(sizeof(email_mail_data_t)); - memset(test_mail_data, 0x00, sizeof(email_mail_data_t)); - - attachment_data = malloc(sizeof(email_attachment_data_t)); - memset(attachment_data, 0x00, sizeof(email_attachment_data_t)); - - test_mail_data->account_id = g_accountId; - test_mail_data->flags_draft_field = 1; - - test_mail_data->full_address_from = strdup(""); - test_mail_data->full_address_to = strdup(""); - test_mail_data->subject = strdup("Test"); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId , EMAIL_MAILBOX_TYPE_OUTBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - return ; - } - - test_mail_data->mailbox_id = mailbox->mailbox_id; - test_mail_data->mailbox_type = mailbox->mailbox_type; - - fp = fopen("/tmp/mail.txt", "w"); - fprintf(fp, "xxxxxxxxx"); - fclose(fp); - - test_mail_data->file_path_plain = strdup("/tmp/mail.txt"); - test_mail_data->attachment_count = 1; - - fp = fopen("/tmp/attach.txt", "w"); - fprintf(fp, "Simple Attach"); - fclose(fp); - - attachment_data->attachment_name = strdup("Attach"); - attachment_data->attachment_path = strdup("/tmp/attach.txt"); - - err_code = email_add_mail(test_mail_data, attachment_data, 1, NULL, 0); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("email_add_mail Success\n"); - tet_printf("account_id[%d], test_mail_data->mail_id[%d]", g_accountId, test_mail_data->mail_id); - err_code = email_send_mail(test_mail_data->mail_id, &option, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("email_send_mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("email_send_mail failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - } - else { - tet_printf("email_add_message failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - - -/*Testcase : uts_Email_Send_Mail_02 - TestObjective : To validate parameter for send a mail - APIs Tested : int email_send_mail(int mail_id, email_option_t* sending_option, unsigned* handle) - */ - -static void uts_Email_Send_Mail_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_option_t option; - - tet_infoline("Email Email_send_mail_02 Begin\n"); - - memset(&option, 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - err_code = email_send_mail(0, &option, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email send mail : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email send mail failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_send_mail.h b/TC/TC_email_service/TC_Network/uts_email_send_mail.h deleted file mode 100755 index 5fe3d4d..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_mail.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Send_Mail_01(void); -static void uts_Email_Send_Mail_02(void); - - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Send_Mail_01, 1}, {uts_Email_Send_Mail_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_send_report.c b/TC/TC_email_service/TC_Network/uts_email_send_report.c deleted file mode 100755 index b37d5b9..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_report.c +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_send_report.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - - -static void startup() -{ - int err_code = EMF_ERROR_NONE; - int count = 0; - int i = 0; - emf_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMF_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMF_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - uts_Email_Add_Real_Message_02(); - } - else { - g_accountId = pAccount[i].account_id; - uts_Email_Add_Real_Message_02(); - } - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMF_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMF_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Send_Report_01 - TestObjective : To send a read receipt mail - APIs Tested : int email_send_report(emf_mail_t *mail, unsigned *handle) - */ - -static void uts_Email_Send_Report_01() -{ - int err_code = EMF_ERROR_NONE; - int handle; - int count = 0; - int i = 0; - emf_mailbox_t mbox; - emf_account_t *account = NULL ; - emf_mail_list_item_t *mail_list = NULL; - emf_mail_t *pMail; - emf_mail_t *mail; - - tet_infoline("uts_Email_Send_Report_01 Begin\n"); - - memset(&mbox, 0x00, sizeof(emf_mailbox_t)); - mbox.name = strdup("INBOX"); - - mbox.account_id = g_accountId; - count = 0; - err_code = email_get_mail_list(mbox.account_id, mbox.name, &mail_list, &count, 0); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("email_get_mail_list : success\n"); - err_code = email_get_mail(&mbox , mail_list[i].mail_id, &pMail); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("email_get_mail success\n"); - - mail = (emf_mail_t *)malloc(sizeof(emf_mail_t)); - memset(mail , 0x00, sizeof(emf_mail_t)); - mail->info = (emf_mail_info_t *)malloc(sizeof(emf_mail_info_t)); - memset(mail->info , 0x00, sizeof(emf_mail_info_t)); - mail->head = (emf_mail_head_t *)malloc(sizeof(emf_mail_head_t)); - memset(mail->head , 0x00, sizeof(emf_mail_head_t)); - mail->body = (emf_mail_body_t *)malloc(sizeof(emf_mail_body_t)); - memset(mail->body , 0x00, sizeof(emf_mail_body_t)); - tet_printf("account_id[%d]", pMail->info->account_id); - mail->info->account_id = pMail->info->account_id; - tet_printf("from[%s]", pMail->head->from); - mail->head->from = strdup(pMail->head->from); - mail->head->mid = strdup("Mid"); - - tet_printf("mid[%d]", mail->head->mid); - - err_code = email_send_report(mail , &handle); - if (EMF_ERROR_NONE == err_code) { - tet_infoline("email_send_report success \n"); - tet_result(TET_PASS); - } - else { - tet_printf("email_send_report failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_mail(&mail, 1); - } - else { - tet_printf("email_get_mail failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - email_free_mail(&pMail, 1); - } - else { - tet_printf("email_get_mail failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - -/* email_free_mail_list(&mail_list, count) */ - free(mail_list); -} - - -/*Testcase : uts_Email_Send_Report_02 - TestObjective : To validate send a read receipt mail - APIs Tested : int email_send_report(emf_mail_t *mail, unsigned *handle) - */ -static void uts_Email_Send_Report_02() -{ - int err_code = EMF_ERROR_NONE; - int handle; - emf_mail_t *mail = NULL;/*Validation Field*/ - - tet_infoline("uts_Email_Send_Report_02 Begin\n"); - - err_code = email_send_report(mail , &handle); - if (EMF_ERROR_NONE != err_code) { - tet_infoline("email_send_report : success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("email_send_report : failed\n"); - tet_result(TET_FAIL); - } - -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_send_report.h b/TC/TC_email_service/TC_Network/uts_email_send_report.h deleted file mode 100755 index 7996af6..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_report.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "Emf_Mapi_Init.h" -#include "Emf_Mapi_Account.h" -#include "Emf_Mapi_Mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Send_Report_01(void); -static void uts_Email_Send_Report_02(void); - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Send_Report_01, 1}, {uts_Email_Send_Report_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_send_saved.c b/TC/TC_email_service/TC_Network/uts_email_send_saved.c deleted file mode 100755 index 0d871e0..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_saved.c +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_send_saved.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Send_Saved_01 - TestObjective : To send all saved mails - APIs Tested : int email_send_saved(int account_id, email_option_t *sending_option, unsigned *handle) - */ - -static void uts_Email_Send_Saved_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_option_t option; - email_account_t *account = NULL ; - int count = 0; - - tet_infoline("uts_email_send_saved_01 Begin\n"); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count <=0 ) { - tet_printf("email_get_account_list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - memset(&option , 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - err_code = email_send_saved(account[0].account_id, &option, &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email send and saved : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email send and saved failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - -} - -/*Testcase : uts_Email_Send_Saved_02 - TestObjective : To validate parameter for account_id in send all saved mails - APIs Tested : int email_send_saved(int account_id, email_option_t *sending_option, unsigned *handle) - */ - -static void uts_Email_Send_Saved_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int account_id = -1; - email_option_t option; - - tet_infoline("uts_email_send_saved_02 Begin\n"); - - memset(&option , 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - err_code = email_send_saved(account_id, &option, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email send and saved : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email send and saved failed : \n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_email_send_saved_03 - TestObjective : To validate parameter for sending_option in send all saved mails - APIs Tested : int email_send_saved(int account_id, email_option_t *sending_option, unsigned *handle) - */ - -static void uts_Email_Send_Saved_03() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - - tet_infoline("uts_email_send_saved_03 Begin\n"); - - - err_code = email_send_saved(g_accountId, NULL, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email send and saved : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email send and saved failed : \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Network/uts_email_send_saved.h b/TC/TC_email_service/TC_Network/uts_email_send_saved.h deleted file mode 100755 index c59dce9..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_send_saved.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Send_Saved_01(void); -static void uts_Email_Send_Saved_03(void); -static void uts_Email_Send_Saved_02(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Send_Saved_01, 1}, {uts_Email_Send_Saved_02, 2}, {uts_Email_Send_Saved_03, 3}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_header.c b/TC/TC_email_service/TC_Network/uts_email_sync_header.c deleted file mode 100755 index b40d8d7..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_header.c +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_sync_header.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Sync_Header_01 - TestObjective : To download email headers - APIs Tested : int email_sync_header(int input_account_id, int input_maibox_id, unsigned* handle) - */ - -static void uts_Email_Sync_Header_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_mailbox_t *mailbox = NULL; - email_account_t *account = NULL ; - int count = 0; - - tet_infoline("uts_email_sync_header_01 Begin\n"); - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE != err_code || count <=0 ) { - tet_printf("email_get_account_list failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - err_code = email_get_mailbox_by_mailbox_type(account[0].account_id, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - err_code = email_sync_header(g_accountId, mailbox->mailbox_id , &handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync mail header : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync mail header failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Sync_Header_02 - TestObjective : To validate parameter for mailbox account_id in download email headers - APIs Tested : int email_sync_header(int input_account_id, int input_maibox_id, unsigned* handle) - */ - -static void uts_Email_Sync_Header_02() -{ - int err_code = EMAIL_ERROR_NONE; - email_mailbox_t mbox; - int handle; - - tet_infoline("uts_Email_Sync_Header_02 Begin\n"); - - err_code = email_sync_header(-1, 0, &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email sync mail header : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync mail header failed : \n"); - tet_result(TET_FAIL); - } -} - -/*Testcase : uts_Email_Sync_Header_03 - TestObjective : To validate parameter for mailbox in download email headers - APIs Tested : int email_sync_header(int input_account_id, int input_maibox_id, unsigned* handle) - */ - -static void uts_Email_Sync_Header_03() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - - tet_infoline("uts_Email_Sync_Header_03 Begin\n"); - - - err_code = email_sync_header(-1, -1 , &handle); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email sync mail header : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync mail header failed : \n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_header.h b/TC/TC_email_service/TC_Network/uts_email_sync_header.h deleted file mode 100755 index 97bb037..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_header.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Sync_Header_01(void); -static void uts_Email_Sync_Header_02(void); -static void uts_Email_Sync_Header_03(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Sync_Header_01, 1}, {uts_Email_Sync_Header_02, 2}, {uts_Email_Sync_Header_03, 3}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.c b/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.c deleted file mode 100755 index be81a96..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.c +++ /dev/null @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_sync_header_for_all_account.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; - - -static void startup() -{ - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) - tet_infoline("Email open DB success\n"); - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - -/*Testcase : uts_Eemail_Sync_Header_For_All_Account_01 - TestObjective : To download email headers for all account - APIs Tested : int email_sync_header_for_all_account(unsigned *handle) - */ - -static void uts_Email_Sync_Header_For_All_Account_01() -{ - int err_code = EMAIL_ERROR_NONE; - email_mailbox_t mbox; - int handle; - - tet_infoline("uts_email_sync_header_for_all_account_01 Begin\n"); - - err_code = email_sync_header_for_all_account(&handle); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync mail header for all account : success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync mail header for all account failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.h b/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.h deleted file mode 100755 index 56efe55..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_header_for_all_account.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Sync_Header_For_All_Account_01(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Sync_Header_For_All_Account_01, 1}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.c b/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.c deleted file mode 100755 index bf66d27..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.c +++ /dev/null @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - -/*************************************** -* add your header file here -* e.g., -* #include "uts_ApplicationLib_recurGetDayOfWeek_func.h" -***************************************/ -#include "uts_email_sync_local_activity.h" -#include "../TC_Utility/uts-email-real-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - tet_printf("\n TC startup"); - - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Real_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); - -} - -static void cleanup() -{ - tet_printf("\n TC End"); - - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Close DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void uts_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void uts_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1 -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : uts_Email_Sync_Local_Activity_01 - TestObjective : To sync local activity - APIs Tested : int email_sync_local_activity(int account_id) - */ - -static void uts_Email_Sync_Local_Activity_01() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - - tet_infoline("uts_email_sync_local_activity_01 Begin\n"); - - err_code = email_sync_local_activity(g_accountId); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync local activity : success\n "); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync local activity : failed err_code[%d]\n", err_code); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_email_sync_local_activity_02 - TestObjective : To validate aparameter for account_id in sync local activity - APIs Tested : int email_sync_local_activity(int account_id) - */ - -static void uts_Email_Sync_Local_Activity_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - int account_id = -1; - - tet_infoline("uts_email_sync_local_activity_02 Begin\n"); - - err_code = email_sync_local_activity(account_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email sync local activity : success\n "); - tet_result(TET_PASS); - } - else { - tet_printf("Email sync local activity : failed \n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.h b/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.h deleted file mode 100755 index cd2ce39..0000000 --- a/TC/TC_email_service/TC_Network/uts_email_sync_local_activity.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - -#include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mailbox.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - - -static void uts_Email_Sync_Local_Activity_01(void); -static void uts_Email_Sync_Local_Activity_02(void); - - - - - -struct tet_testlist tet_testlist[] = { {uts_Email_Sync_Local_Activity_01, 1}, {uts_Email_Sync_Local_Activity_02, 2}, {NULL, 0} -}; diff --git a/TC/TC_email_service/TC_Rule/Makefile b/TC/TC_email_service/TC_Rule/Makefile deleted file mode 100755 index 4abc2fb..0000000 --- a/TC/TC_email_service/TC_Rule/Makefile +++ /dev/null @@ -1,52 +0,0 @@ -################################################### -# add your TestCase List Here -# -# e.g., -# TC1 = utc_frameworkName_apiName_func -# TC2 = utc_ApplicationLib_recurGetDayOfWeek_func -TARGETS = uts-email-add-rule \ - uts-email-delete-rule \ - uts-email-get-rule \ - uts-email-get-rule-list \ - uts-email-update-rule \ - uts-email-free-rule - -################################################### -# add your Package Config Info Here -# -# e.g., -# PKGS=calendar -PKGS= email-service - -LIBS = `pkg-config --libs $(PKGS)` -LIBS += `pkg-config --libs glib-2.0` -LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o -LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s -LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s - -INCS = -I. `pkg-config --cflags $(PKGS)` -INCS += -I. `pkg-config --cflags glib-2.0` -INCS += -I$(TET_ROOT)/inc/tet3 -INCS += -I$(TET_SUITE_ROOT)/TC_email_service/TC_Utility - -UTIL_SRC = $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-dummy-utility.c -UTIL_SRC += $(TET_SUITE_ROOT)/TC_email_service/TC_Utility/uts-email-real-utility.c - -CFLAGS = $(INCS) -CFLAGS += -D_TETWARE_MODE -LDFLAGS = $(LIBS) - -################################################### -# Modify here -# depending on the Test Case you want to build -# -# e.g., -# TCLIST = $(TC1) $(TC2) -all : $(TARGETS) - -$(TARGETS) : %: %.c - $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS) - -clean : - rm -rf $(TARGETS) - diff --git a/TC/TC_email_service/TC_Rule/tslist b/TC/TC_email_service/TC_Rule/tslist deleted file mode 100755 index dc0f06e..0000000 --- a/TC/TC_email_service/TC_Rule/tslist +++ /dev/null @@ -1,6 +0,0 @@ -uts-email-add-rule -uts-email-get-rule -uts-email-get-rule-list -uts-email-update-rule -uts-email-free-rule -uts-email-delete-rule diff --git a/TC/TC_email_service/TC_Rule/uts-email-add-rule.c b/TC/TC_email_service/TC_Rule/uts-email-add-rule.c deleted file mode 100755 index 6b5c2ed..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-add-rule.c +++ /dev/null @@ -1,141 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-add-rule.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) - g_accountId = uts_Email_Add_Dummy_Account_01(); - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Add_Rule_01 - TestObjective : To add a filter rule to an email account - APIs Tested : int email_add_rule(email_rule_t *filtering_set) - */ - -static void uts_Email_Add_Rule_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - email_mailbox_t *src_mailbox = NULL; - - tet_infoline("uts_Email_Add_Rule_01 Begin\n"); - - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &src_mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = src_mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE == err_code || EMAIL_ERROR_ALREADY_EXISTS == err_code) { - tet_infoline("Email add rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pRule, 1); - - if (src_mailbox) { - email_free_mailbox(&src_mailbox, 1); - src_mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Add_Rule_02 - TestObjective : To validate parameter for add a filter rule to an email account - APIs Tested : int email_add_rule(email_rule_t *filtering_set) - */ - -static void uts_Email_Add_Rule_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Add_Rule_02 Begin\n"); - - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email add rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email add rule failed : \n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Rule/uts-email-add-rule.h b/TC/TC_email_service/TC_Rule/uts-email-add-rule.h deleted file mode 100755 index 01c0748..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-add-rule.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Add_Rule_01(void); -static void uts_Email_Add_Rule_02(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Add_Rule_01, 1}, {uts_Email_Add_Rule_02, 2}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Rule/uts-email-delete-rule.c b/TC/TC_email_service/TC_Rule/uts-email-delete-rule.c deleted file mode 100755 index 17952dc..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-delete-rule.c +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-delete-rule.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - -/*************************************** -* add your Test Cases -* e.g., -* static void utc_ApplicationLib_recurGetDayOfWeek_01() -* { -* int ret; -* -* ret = target_api(); -* if (ret == 1) -* tet_result(TET_PASS); -* else -* tet_result(TET_FAIL); -* } -* -* static void utc_ApplicationLib_recurGetDayOfWeek_02() -* { -* code.. -* condition1i -* tet_result(TET_PASS); -* condition2 -* tet_result(TET_FAIL); -* } -* -***************************************/ - - -/*Testcase : utc_Email_Delete_Rule_01 - TestObjective : To delete filter rule information - APIs Tested : int email_delete_rule(int filter_id) - */ - -static void uts_Email_Delete_Rule_01() -{ - int err_code = EMAIL_ERROR_NONE ; - int count = 0; - int i = 0; - email_rule_t *pRule_list = NULL; - email_rule_t *pRule = NULL; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Delete_Rule_01 Begin\n"); - - tet_printf("Email Add rule\n"); - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE == err_code || EMAIL_ERROR_ALREADY_EXISTS == err_code) { - tet_infoline("Email add rule Success\n"); - } - else { - tet_printf("Email add rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pRule, 1); - - tet_printf("Email Get Rule List\n"); - err_code = email_get_rule_list(&pRule_list, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get all filter rule Success\n"); - if (count > 0) { - tet_printf("Email Delete Rule : rule id [%d]\n", pRule_list[0].filter_id); - err_code = email_delete_rule(pRule_list[0].filter_id); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email delete filter rule : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete filter rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - - } - else { - tet_infoline("NO filter rule found : Success\n"); - tet_result(TET_UNRESOLVED); - } - } - else { - tet_printf("Email get all filter rule failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Delete_Rule_02 - TestObjective : To validate parameter for delete filter rule information - APIs Tested : int email_delete_rule(int filter_id) - */ - -static void uts_Email_Delete_Rule_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Delete_Rule_02 Begin\n"); - - err_code = email_delete_rule(0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email delete filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email delete filter rule failed\n"); - tet_result(TET_FAIL); - } -} - - - diff --git a/TC/TC_email_service/TC_Rule/uts-email-delete-rule.h b/TC/TC_email_service/TC_Rule/uts-email-delete-rule.h deleted file mode 100755 index 46d9883..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-delete-rule.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Delete_Rule_01(void); -static void uts_Email_Delete_Rule_02(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Delete_Rule_01, 1}, {uts_Email_Delete_Rule_02, 2}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Rule/uts-email-free-rule.c b/TC/TC_email_service/TC_Rule/uts-email-free-rule.c deleted file mode 100755 index a186287..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-free-rule.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-free-rule.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Free_Rule_01 - TestObjective : To free allcated memory for a filter rule - APIs Tested : int email_free_rule(email_rule_t *filtering_set, int count) - */ - -static void uts_Email_Free_Rule_01() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Free_Rule_01 Begin\n"); - - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - - err_code = email_free_rule(&pRule, 1); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email free rule success\n"); - tet_result(TET_PASS); - } - else { - tet_infoline("Email free rule failed\n"); - tet_result(TET_FAIL); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - - diff --git a/TC/TC_email_service/TC_Rule/uts-email-free-rule.h b/TC/TC_email_service/TC_Rule/uts-email-free-rule.h deleted file mode 100755 index ae610f7..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-free-rule.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Free_Rule_01(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Free_Rule_01, 1}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.c b/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.c deleted file mode 100755 index 6ccc3af..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.c +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-rule-list.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - - - - -/*Testcase : uts_Email_Get_Rule_List_01 - TestObjective : To get all filter rule information - APIs Tested : int email_get_rule_list(email_rule_t **filtering_set, int *count) - */ - -static void uts_Email_Get_Rule_List_01() -{ - int err_code = EMAIL_ERROR_NONE ; - int count = 0; - email_rule_t *pRule_list = NULL; - email_rule_t *pRule = NULL; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Get_Rule_List_01 Begin\n"); - - - tet_printf("Email Add rule\n"); - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE == err_code || EMAIL_ERROR_ALREADY_EXISTS == err_code) { - tet_infoline("Email add rule Success\n"); - } - else { - tet_printf("Email add rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pRule, 1); - - tet_printf("Email Get Rule List\n"); - - err_code = email_get_rule_list(&pRule_list, &count); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get all filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all filter rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Get_Rule_List_02 - TestObjective : To validate parameter for filtering_set in get all filter rule information - APIs Tested : int email_get_rule_list(email_rule_t **filtering_set, int *count) - */ - -static void uts_Email_Get_Rule_List_02() -{ - int err_code = EMAIL_ERROR_NONE ; - int count = 0; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Get_Rule_List_02 Begin\n"); - - err_code = email_get_rule_list(NULL, &count); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get all filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all filter rule failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Rule_List_03 - TestObjective : To validate parameter for count in get all filter rule information - APIs Tested : int email_get_rule_list(email_rule_t **filtering_set, int *count) - */ - -static void uts_Email_Get_Rule_List_03() -{ - int err_code = EMAIL_ERROR_NONE ; - int count = 0; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Get_Rule_List_03 Begin\n"); - - err_code = email_get_rule_list(&pRule, 0); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get all filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get all filter rule failed\n"); - tet_result(TET_FAIL); - } -} - - diff --git a/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.h b/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.h deleted file mode 100755 index 45315cd..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-get-rule-list.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Rule_List_01(void); -static void uts_Email_Get_Rule_List_02(void); -static void uts_Email_Get_Rule_List_03(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Get_Rule_List_01, 1}, {uts_Email_Get_Rule_List_02, 2}, {uts_Email_Get_Rule_List_03, 3}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Rule/uts-email-get-rule.c b/TC/TC_email_service/TC_Rule/uts-email-get-rule.c deleted file mode 100755 index 0e8eb0a..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-get-rule.c +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-get-rule.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Get_Rule_01 - TestObjective : To get filter information - APIs Tested : int email_get_rule(int filter_id, email_rule_t **filter_info) - */ - -static void uts_Email_Get_Rule_01() -{ - int err_code = EMAIL_ERROR_NONE ; - int filter_id = 1; - email_rule_t *pRule = NULL; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Get_Rule_01 Begin\n"); - - tet_printf("Email Add rule\n"); - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE == err_code || EMAIL_ERROR_ALREADY_EXISTS == err_code) { - tet_infoline("Email add rule Success\n"); - } - else { - tet_printf("Email add rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pRule, 1); - - err_code = email_get_rule(filter_id, &pRule); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email get rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Get_Rule_02 - TestObjective : To validate parameter for filter_info in find filter rule to an email account - APIs Tested : int email_get_rule(int filter_id, email_rule_t **filter_info) - */ - -static void uts_Email_Get_Rule_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Get_Rule_02 Begin\n"); - - err_code = email_get_rule(1, NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get rule failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Get_Rule_03 - TestObjective : To validate parameter for filter_id in find filter rule to an email account - APIs Tested : int email_get_rule(int filter_id, email_rule_t **filter_info) - */ - -static void uts_Email_Get_Rule_03() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Get_Rule_03 Begin\n"); - - err_code = email_get_rule(0, &pRule); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email get rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email get rule failed\n"); - tet_result(TET_FAIL); - } -} diff --git a/TC/TC_email_service/TC_Rule/uts-email-get-rule.h b/TC/TC_email_service/TC_Rule/uts-email-get-rule.h deleted file mode 100755 index 7ad48fa..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-get-rule.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Get_Rule_01(void); -static void uts_Email_Get_Rule_02(void); -static void uts_Email_Get_Rule_03(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Get_Rule_01, 1}, {uts_Email_Get_Rule_02, 2}, {uts_Email_Get_Rule_03, 3}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Rule/uts-email-update-rule.c b/TC/TC_email_service/TC_Rule/uts-email-update-rule.c deleted file mode 100755 index aa08175..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-update-rule.c +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Copyright (c) 2010 Samsung Electronics, Inc. -* All rights reserved. -* -* This software is a confidential and proprietary information of Samsung -* Electronics, Inc. ("Confidential Information"). You shall not disclose such -* Confidential Information and shall use it only in accordance with the terms -* of the license agreement you entered into with Samsung Electronics. -*/ - - -#include "uts-email-update-rule.h" -#include "../TC_Utility/uts-email-dummy-utility.c" - - -sqlite3 *sqlite_emmb; -static int g_accountId; - -static void startup() -{ - int err_code = EMAIL_ERROR_NONE; - int count = 0; - int i = 0; - email_account_t *pAccount = NULL ; - - tet_printf("\n TC startup"); - - if (EMAIL_ERROR_NONE == email_service_begin()) { - tet_infoline("Email service Begin\n"); - if (EMAIL_ERROR_NONE == email_open_db()) { - tet_infoline("Email open DB success\n"); - err_code = email_get_account_list(&pAccount, &count); - if (!count) { - g_accountId = uts_Email_Add_Dummy_Account_01(); - } - else - g_accountId = pAccount[i].account_id; - email_free_account(&pAccount, count); - - } - else - tet_infoline("Email open DB failed\n"); - } - else - tet_infoline("Email service not started\n"); -} - -static void cleanup() -{ - tet_printf("\n TC End"); - if (EMAIL_ERROR_NONE == email_close_db()) { - tet_infoline("Email Close DB Success\n"); - if (EMAIL_ERROR_NONE == email_service_end()) - tet_infoline("Email service close Success\n"); - else - tet_infoline("Email service end failed\n"); - } - else - tet_infoline("Email Cloase DB failed\n"); -} - - - - - - -/*Testcase : uts_Email_Update_Rule_01 - TestObjective : To update filter rule information - APIs Tested : int email_update_rule(int filter_id, email_rule_t *new_set) - */ - -static void uts_Email_Update_Rule_01() -{ - int err_code = EMAIL_ERROR_NONE ; - int count = 0; - int i = 0; - email_rule_t *pRule_list = NULL; - email_rule_t *pNew_rule; - email_rule_t *pRule = NULL; - email_mailbox_t *mailbox = NULL; - - tet_infoline("uts_Email_Update_Rule_01 Begin\n"); - - tet_printf("Email Add rule\n"); - pRule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pRule, 0x00, sizeof(email_rule_t)); - - err_code = email_get_mailbox_by_mailbox_type(g_accountId, EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - - pRule->account_id = g_accountId; - pRule->type = RULE_TYPE_INCLUDES; - pRule->value = strdup("a"); - pRule->faction = EMAIL_FILTER_BLOCK; - pRule->target_mailbox_id = mailbox->mailbox_id; - pRule->flag1 = 1; - pRule->flag2 = 0; - err_code = email_add_rule(pRule); - if (EMAIL_ERROR_NONE == err_code || EMAIL_ERROR_ALREADY_EXISTS == err_code) { - tet_infoline("Email add rule Success\n"); - } - else { - tet_printf("Email add rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pRule, 1); - - tet_printf("Email Get Rule List\n"); - err_code = email_get_rule_list(&pRule_list, &count); - if (EMAIL_ERROR_NONE == err_code && count > 0) { - tet_infoline("Email get all filter rule Success\n"); - pNew_rule = (email_rule_t *)malloc(sizeof(email_rule_t)); - memset(pNew_rule , 0x00, sizeof(email_rule_t)); - - pNew_rule->account_id = pRule_list[i].account_id; - pNew_rule->type = RULE_TYPE_EXACTLY; - pNew_rule->value = strdup("ab"); - pNew_rule->target_mailbox_id = mailbox->mailbox_id; - pNew_rule->faction = pRule_list[i].faction; - pNew_rule->flag1 = pRule_list[i].flag1; - pNew_rule->flag2 = pRule_list[i].flag2; - - tet_printf("Email Update Rule\n"); - err_code = email_update_rule(pRule_list[i].filter_id, pNew_rule); - if (EMAIL_ERROR_NONE == err_code) { - tet_infoline("Email update rule : Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email update filter rule failed : error_code[%d]\n", err_code); - tet_result(TET_FAIL); - } - email_free_rule(&pNew_rule, 1); - } - else { - tet_printf("Email get all filter rule failed : error_code[%d]\n", err_code); - tet_result(TET_UNRESOLVED); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - -/*Testcase : uts_Email_Update_Rule_02 - TestObjective : To validate parameter for new_set in update filter rule information - APIs Tested : int email_update_rule(int filter_id , email_rule_t *new_set) - */ - -static void uts_Email_Update_Rule_02() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Update_Rule_02 Begin\n"); - - err_code = email_update_rule(1, NULL); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email update filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email update filter rule failed\n"); - tet_result(TET_FAIL); - } -} - - -/*Testcase : uts_Email_Update_Rule_03 - TestObjective : To validate parameter for filter_id in update filter rule information - APIs Tested : int email_update_rule(int filter_id , email_rule_t *new_set) - */ - -static void uts_Email_Update_Rule_03() -{ - int err_code = EMAIL_ERROR_NONE ; - email_rule_t *pRule = NULL; - - tet_infoline("uts_Email_Update_Rule_03 Begin\n"); - - err_code = email_update_rule(0, pRule); - if (EMAIL_ERROR_NONE != err_code) { - tet_infoline("Email update filter rule Success\n"); - tet_result(TET_PASS); - } - else { - tet_printf("Email update filter rule failed\n"); - tet_result(TET_FAIL); - } -} - diff --git a/TC/TC_email_service/TC_Rule/uts-email-update-rule.h b/TC/TC_email_service/TC_Rule/uts-email-update-rule.h deleted file mode 100755 index cef3d96..0000000 --- a/TC/TC_email_service/TC_Rule/uts-email-update-rule.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -#include - - #include - #include - #include - #include "email-api-init.h" - #include "email-api-account.h" - #include "email-api-rule.h" - -static void startup(), cleanup(); -void (*tet_startup) () = startup; -void (*tet_cleanup) () = cleanup; - -static void uts_Email_Update_Rule_01(void); -static void uts_Email_Update_Rule_02(void); -static void uts_Email_Update_Rule_03(void); - - - - struct tet_testlist tet_testlist[] = { {uts_Email_Update_Rule_01, 1}, {uts_Email_Update_Rule_02, 2}, {uts_Email_Update_Rule_03, 3}, {NULL, 0} - }; diff --git a/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.c b/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.c deleted file mode 100755 index 2590c07..0000000 --- a/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.c +++ /dev/null @@ -1,169 +0,0 @@ -#include "uts-email-dummy-utility.h" - - -int uts_Email_Add_Dummy_Account_01() -{ - email_account_t *account = NULL; - int err_code = EMAIL_ERROR_NONE; - - tet_infoline("uts_Email_Add_Dummy_Account\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account , 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail POP"); - account->user_display_name = strdup("samsungtest09"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_POP3; - account->incoming_server_address = strdup("pop.gmail.com"); - account->incoming_server_port_number = 995; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address = strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account(account); - if (EMAIL_ERROR_NONE == err_code) { - printf("email add account : success\n"); - tet_printf("email add account : success\n"); - return account->account_id; - } - else { - printf("email add account : failed err_code[%d]", err_code); - tet_printf("email add account : failed err_code[%d]", err_code); - } - email_free_account(&account, 1); - } - return 0; -} - - -int uts_Email_Add_Dummy_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - - email_mail_data_t *test_mail_data = NULL; - email_attachment_data_t *attachment_data = NULL; - email_meeting_request_t *meeting_req = NULL; - email_mailbox_t *mailbox = NULL; - - FILE *fp; - email_option_t option; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - - memset(&option, 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - test_mail_data = malloc(sizeof(email_mail_data_t)); - memset(test_mail_data, 0x00, sizeof(email_mail_data_t)); - - attachment_data = malloc(sizeof(email_attachment_data_t)); - memset(attachment_data, 0x00, sizeof(email_attachment_data_t)); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code && count > 0) { - - test_mail_data->account_id = account[i].account_id; - test_mail_data->flags_draft_field = 1; - - test_mail_data->save_status = 1; - test_mail_data->body_download_status = 1; - - test_mail_data->server_mail_id = strdup("TESTMAIL_1"); - - test_mail_data->full_address_from = strdup(""); - test_mail_data->full_address_to = strdup(""); - test_mail_data->subject = strdup("Test"); - - err_code = email_get_mailbox_by_mailbox_type(account[i].account_id , EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - return err_code; - } - - test_mail_data->mailbox_id = mailbox->mailbox_id; - test_mail_data->mailbox_type = mailbox->mailbox_type; - - fp = fopen("/tmp/mail.txt", "w"); - fprintf(fp, "xxxxxxxxx"); - fclose(fp); - test_mail_data->file_path_plain = strdup("/tmp/mail.txt"); - test_mail_data->attachment_count = 1; - - fp = fopen("/tmp/attach.txt", "w"); - fprintf(fp, "Simple Attachment"); - fclose(fp); - - attachment_data->attachment_name = strdup("Attach"); - attachment_data->attachment_path = strdup("/tmp/attach.txt"); - attachment_data->save_status = 1; - - err_code = email_add_mail(test_mail_data, attachment_data, 1, NULL, 0); - if (EMAIL_ERROR_NONE == err_code) { - printf("email add mail : success\n"); - } - else { - printf("email add mail : failed err_code[%d]\n", err_code); - } - } - else { - printf("emaill get account list : failed err_code[%d]", err_code); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } - - return err_code; -} - -int uts_Email_Get_Mail_List_03(int account_id, email_mailbox_type_e mailbox_type, email_mail_list_item_t** mail_list, int* result_count, email_sort_type_t sorting) { - - email_mailbox_t *mailbox = NULL; - int err_code = EMAIL_ERROR_NONE; - - if(account_id != ALL_ACCOUNT && mailbox_type != 0) - err_code = email_get_mailbox_by_mailbox_type(account_id , mailbox_type, &mailbox); - - if (EMAIL_ERROR_NONE == err_code) { - err_code = email_get_mail_list(account_id , mailbox ? mailbox->mailbox_id : 0, 0, 0, EMAIL_GET_MAIL_LIST_MAX, sorting, mail_list, result_count); - } - - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } - - return err_code; - -} diff --git a/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.h b/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.h deleted file mode 100755 index 970b0d4..0000000 --- a/TC/TC_email_service/TC_Utility/uts-email-dummy-utility.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -/* #include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -//#define email_get_mail_list(account_id, mailbox_name, mail_list, count, sorting) email_get_mail_list_ex(account_id, mailbox_name, EMAIL_LIST_TYPE_NORMAL, -1, -1, sorting, mail_list, count) -#define EMAIL_GET_MAIL_LIST_MAX 20 - -int uts_Email_Add_Dummy_Account_01(void); -int uts_Email_Add_Dummy_Message_02(void); -int uts_Email_Get_Mail_List_03(int account_id, email_mailbox_type_e mailbox_type, email_mail_list_item_t** mail_list, int* result_count, email_sort_type_t sorting); - -/* struct tet_testlist tet_testlist[] = */ -/* */ -/* { uts_Email_Add_Dummy_Account_01, 1} */ -/* { uts_Email_Add_Dummy_Message_02, 2} */ -/* {NULL, 0 */ -/* } */ diff --git a/TC/TC_email_service/TC_Utility/uts-email-real-utility.c b/TC/TC_email_service/TC_Utility/uts-email-real-utility.c deleted file mode 100755 index 462bcd1..0000000 --- a/TC/TC_email_service/TC_Utility/uts-email-real-utility.c +++ /dev/null @@ -1,221 +0,0 @@ -#include "uts-email-real-utility.h" - - -int uts_Email_Add_Real_Account_01() -{ - email_account_t *account = NULL; - int err_code = EMAIL_ERROR_NONE; - int handle; - int account_id = 0; - - tet_infoline("uts_Email_Add_Real_Account_01\n"); - - /* POP */ - tet_infoline("Add POP3 account\n"); - printf("Add POP3 account\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account , 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail POP"); - account->user_display_name = strdup("samsungtest09"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_POP3; - account->incoming_server_address = strdup("pop.gmail.com"); - account->incoming_server_port_number = 995; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address = strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail POP3 Signature"); - account->check_interval = 0; - - err_code = email_add_account(account); - if (EMAIL_ERROR_NONE == err_code) { - printf("email add account : success\n"); - tet_printf("email add account : success\n"); - /* return account->account_id */ - account_id = account->account_id; - } - else { - printf("email add account : failed err_code[%d]", err_code); - tet_printf("email add account : failed err_code[%d]", err_code); - } - email_free_account(&account, 1); - } - - tet_infoline("Add IMAP4 account\n"); - printf("Add IMAP4 account\n"); - account = (email_account_t *)malloc(sizeof(email_account_t)); - if (account) { - memset(account , 0x00, sizeof(email_account_t)); - - account->account_name = strdup("Gmail IMAP"); - account->user_display_name = strdup("samsungtest09"); - account->user_email_address = strdup("samsungtest09@gmail.com"); - account->reply_to_address = strdup("samsungtest09@gmail.com"); - account->return_address = strdup("samsungtest09@gmail.com"); - account->incoming_server_type = EMAIL_SERVER_TYPE_IMAP4; - account->incoming_server_address = strdup("imap.gmail.com"); - account->incoming_server_port_number = 993; - account->incoming_server_secure_connection = 1; - account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_NEW; - account->incoming_server_user_name = strdup("samsungtest09"); - account->incoming_server_password = strdup("samsung09"); - account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP; - account->outgoing_server_address = strdup("smtp.gmail.com"); - account->outgoing_server_port_number = 465; - account->outgoing_server_secure_connection = 1; - account->outgoing_server_need_authentication = 1; - account->outgoing_server_user_name = strdup("samsungtest09"); - account->outgoing_server_password = strdup("samsung09"); - account->pop_before_smtp = 0; - account->incoming_server_requires_apop = 0; - account->auto_download_size = 0; /* downloading option, 0 is subject only, 1 is text body, 2 is normal */ - account->outgoing_server_use_same_authenticator = 1; /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3 */ - account->logo_icon_path = NULL; - account->options.priority = 3; - account->options.keep_local_copy = 0; - account->options.req_delivery_receipt = 0; - account->options.req_read_receipt = 0; - account->options.download_limit = 0; - account->options.block_address = 0; - account->options.display_name_from = NULL; - account->options.reply_with_body = 0; - account->options.forward_with_files = 0; - account->options.add_myname_card = 0; - account->options.add_signature = 0; - account->options.signature = strdup("Gmail IMAP4 Signature"); - account->check_interval = 0; - - err_code = email_add_account_with_validation(account, &handle); - if (EMAIL_ERROR_NONE == err_code) { - /* - err_code = email_validate_account(account->account_id, &handle); - if (EMAIL_ERROR_NONE == err_code) { - printf("email add account success\n"); - return account->account_id; - } - else { - - printf("email add ccount : Failed err_code[%d]", err_code); - } - */ - printf("email add account - in progress\n"); - } - else { - printf("email add ccount : Failed err_code[%d]", err_code); - } - email_free_account(&account, 1); - } - - return account_id; -} - - -int uts_Email_Add_Real_Message_02() -{ - int err_code = EMAIL_ERROR_NONE; - int handle; - email_mail_data_t *test_mail_data = NULL; - email_attachment_data_t *attachment_data = NULL; - email_meeting_request_t *meeting_req = NULL; - email_mailbox_t *mailbox = NULL; - - FILE *fp; - email_option_t option; - int count = 0; - int i = 0; - email_account_t *account = NULL ; - - memset(&option, 0x00, sizeof(email_option_t)); - option.keep_local_copy = 1; - - test_mail_data = malloc(sizeof(email_mail_data_t)); - memset(test_mail_data, 0x00, sizeof(email_mail_data_t)); - - attachment_data = malloc(sizeof(email_attachment_data_t)); - memset(attachment_data, 0x00, sizeof(email_attachment_data_t)); - - err_code = email_get_account_list(&account, &count); - if (EMAIL_ERROR_NONE == err_code && count > 0) { - test_mail_data->account_id = account[i].account_id; - test_mail_data->flags_draft_field = 1; - - test_mail_data->body_download_status = 1; - - test_mail_data->server_mail_id = strdup("testmail_1"); - - test_mail_data->full_address_from = strdup(""); - test_mail_data->full_address_to = strdup(""); - test_mail_data->subject = strdup("Test"); - - err_code = email_get_mailbox_by_mailbox_type(account[i].account_id , EMAIL_MAILBOX_TYPE_INBOX, &mailbox); - if (EMAIL_ERROR_NONE != err_code) { - tet_printf("Email get mailbox by mailbox type failed : error_code[%d]\n", err_code); - return err_code; - } - - test_mail_data->mailbox_id = mailbox->mailbox_id; - test_mail_data->mailbox_type = mailbox->mailbox_type; - - fp = fopen("/tmp/mail.txt", "w"); - fprintf(fp, "xxxxxxxxx"); - fclose(fp); - - test_mail_data->file_path_plain = strdup("/tmp/mail.txt"); - test_mail_data->attachment_count = 1; - - fp = fopen("/tmp/attach.txt", "w"); - fprintf(fp, "Simple Attachment"); - fclose(fp); - - attachment_data->attachment_name = strdup("Attach"); - attachment_data->attachment_path = strdup("/tmp/attach.txt"); - attachment_data->save_status = 1; - - err_code = email_add_mail(test_mail_data, attachment_data, 1, NULL, 0); - - if (EMAIL_ERROR_NONE == err_code) { - printf("email add message success\n"); - return test_mail_data->mail_id; - } - else { - printf("email add message : Failed err_code[%d]", err_code); - } - } - else { - printf("emailccount list : Failed err_code[%d]", err_code); - } - if (mailbox) { - email_free_mailbox(&mailbox, 1); - mailbox = NULL; - } -} - - diff --git a/TC/TC_email_service/TC_Utility/uts-email-real-utility.h b/TC/TC_email_service/TC_Utility/uts-email-real-utility.h deleted file mode 100755 index 27a85a2..0000000 --- a/TC/TC_email_service/TC_Utility/uts-email-real-utility.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2010 Samsung Electronics, Co., Ltd. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Co., Ltd. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - */ - -/* #include -#include -#include -#include -#include "email-api-init.h" -#include "email-api-account.h" -#include "email-api-mail.h" - -//#define email_get_mail_list(account_id, mailbox_name, mail_list, count, sorting) email_get_mail_list_ex(account_id, mailbox_name, EMAIL_LIST_TYPE_NORMAL, -1, -1, sorting, mail_list, count) - -int uts_Email_Add_Real_Account_01(void); -int uts_Email_Add_Real_Message_02(void); - -/* struct tet_testlist tet_testlist[] = */ -/* */ -/* { uts_Email_Add_Real_Account_01, 1} */ -/* { uts_Email_Add_Real_Message_02, 2} */ -/* {NULL, 0 */ -/* } */ - - diff --git a/TC/TC_email_service/_export_env.sh b/TC/TC_email_service/_export_env.sh deleted file mode 100755 index 119d077..0000000 --- a/TC/TC_email_service/_export_env.sh +++ /dev/null @@ -1,19 +0,0 @@ -export ARCH=target - -export TET_INSTALL_PATH=/myfiles/download/DTS/TETware # tetware root path -echo $TET_INSTALL_PATH -export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target.3.8 # tetware target path -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 -echo $TET_SUITE_ROOT - -set $(date +%s) -FILE_NAME_EXTENSION=$1 -echo $TET_SUITE_ROOT - -make diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh deleted file mode 100755 index 7a39b14..0000000 --- a/TC/_export_target_env.sh +++ /dev/null @@ -1,17 +0,0 @@ - -export ARCH=target - -#export TET_INSTALL_PATH=/opt/slp/TETware # path to mount -export TET_INSTALL_PATH=/mnt/nfs/tet # path to mount -export TET_TARGET_PATH=$TET_INSTALL_PATH/tet3.8 -export PATH=$TET_TARGET_PATH/bin:$PATH -export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH - -export TET_ROOT=$TET_TARGET_PATH - -set $(pwd) -export TET_SUITE_ROOT=$1 - -set $(date +%s) -FILE_NAME_EXTENSION=$1 - diff --git a/TC/build.sh b/TC/build.sh deleted file mode 100755 index 439bfde..0000000 --- a/TC/build.sh +++ /dev/null @@ -1,20 +0,0 @@ -. ./TC_email_service/_export_env.sh # setting environment variables - -echo PATH=$PATH -echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH -echo TET_ROOT=$TET_ROOT -echo TET_SUITE_ROOT=$TET_SUITE_ROOT -echo ARCH=$ARCH - -export TET_INSTALL_PATH=/git/tet/tet3.8 - -RESULT_DIR=results-$ARCH -HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir $RESULT_DIR - -tcc -c -p ./ # executing tcc, with clean option (-c) -tcc -b -j $JOURNAL_RESULT -p ./ # executing tcc to build test cases (-b) -grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT # reporting the result - diff --git a/TC/execute.sh b/TC/execute.sh deleted file mode 100755 index e1ed207..0000000 --- a/TC/execute.sh +++ /dev/null @@ -1,17 +0,0 @@ -. ./_export_target_env.sh # setting environment variables - -echo PATH=$PATH -echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH -echo TET_ROOT=$TET_ROOT -echo TET_SUITE_ROOT=$TET_SUITE_ROOT -echo ARCH=$ARCH - -RESULT_DIR=results-$ARCH -HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html -JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal - -mkdir $RESULT_DIR - -tcc -e -j $JOURNAL_RESULT -p ./ # executing tcc, with –e option -grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT # reporting the result - diff --git a/TC/making_new_tet_scen.py b/TC/making_new_tet_scen.py deleted file mode 100755 index 8cde490..0000000 --- a/TC/making_new_tet_scen.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/python - -############################################# -# tet_scen auto generator -# -# ** argv[1] = TC root -############################################# - -import sys,string,os - - -write_file = open("tet_scen", 'w') - -# -# making new tet_scen -# -def making_tet_scen (filename): - #tmp_list = filename.strip().split('/') - n_filename = filename.replace(' ', '\\ ') - #print n_filename - #new_path = "/"+ sys.argv[1] +"/"+n_filename[2:-6] - new_path = "/"+n_filename[:-6] - #print new_path - file = open(filename, 'r') - lines = file.readlines() - for line in lines: - if len(line.strip()) > 1: - list = line.strip().split('/') - #print new_path + list[0] - #print new_path + list[-1] - write_file.write("\t"+new_path + list[0]+"\n") - -# -# usage() -# -def usage(): - print(" ") - print("./making_new_tet_scen.py tc_root") - print("Put the Test Case's root directory.") - print("Do not include '/' at the end") - print(" ") - -# -# main() -# -def main(): - if len(sys.argv) < 2: - usage() - sys.exit(0) - - os.system('find '+ sys.argv[1] +' -name "tslist" > tslist.txt') - - #write_file = open("tetscen", w) - write_file.write("# auto generated tet_scen\n") - write_file.write("all\n") - write_file.write("\t\"Starting Full Test Suite\"\n") - - for file in open("tslist.txt", 'r'): - #print file.strip() - making_tet_scen(file.strip()) - - write_file.write("\t\"Completed Full Test Suite\"\n") - write_file.write("# EOF\n") - write_file.close() - print(" ") - print("==============================") - print("New tet_scen file is made~~~~") - print("==============================") - print(" ") -main() diff --git a/TC/tet_scen b/TC/tet_scen deleted file mode 100644 index ed179f3..0000000 --- a/TC/tet_scen +++ /dev/null @@ -1,61 +0,0 @@ -# auto generated tet_scen -all - "Starting Full Test Suite" - /./TC_email_service/TC_Folder/uts-email-add-mailbox - /./TC_email_service/TC_Folder/uts-email-get-mailbox-list - /./TC_email_service/TC_Folder/uts-email-get-mailbox-by-mailboxtype - /./TC_email_service/TC_Folder/uts-email-delete-mailbox - /./TC_email_service/TC_Message/uts-email-add-message - /./TC_email_service/TC_Message/uts-email-add-attachment - /./TC_email_service/TC_Message/uts-email-get-info - /./TC_email_service/TC_Message/uts-email-get-attachment-info - /./TC_email_service/TC_Message/uts-email-get-mail-list-ex - /./TC_email_service/TC_Message/uts-email-get-disk-space-usage - /./TC_email_service/TC_Message/uts-email-get-max-mail-count - /./TC_email_service/TC_Message/uts-email-get-mailbox-list - /./TC_email_service/TC_Message/uts-email-update-message - /./TC_email_service/TC_Message/uts-email-count-message - /./TC_email_service/TC_Message/uts-email-cancel-send-mail - /./TC_email_service/TC_Message/uts-email-send-retry - /./TC_email_service/TC_Message/uts-email-move-mail-to-folder - /./TC_email_service/TC_Message/uts-email-move-all-mails-to-folder - /./TC_email_service/TC_Message/uts-email-free-mail-info - /./TC_email_service/TC_Message/uts-email-free-attachment-info - /./TC_email_service/TC_Message/uts-email-free-mailbox - /./TC_email_service/TC_Message/uts-email-delete-attachment - /./TC_email_service/TC_Message/uts-email-delete-message - /./TC_email_service/TC_Message/uts-email-delete-all-message-in-folder - /./TC_email_service/TC_Message/uts-email-create-db-full - /./TC_email_service/TC_Message/uts-email-clear-mail-data - /./TC_email_service/TC_Account/uts-email-add-account - /./TC_email_service/TC_Account/uts-email-validate-account - /./TC_email_service/TC_Account/uts-email-update-account - /./TC_email_service/TC_Account/uts-email-add-account-with-validation - /./TC_email_service/TC_Account/uts-email-get-account - /./TC_email_service/TC_Account/uts-email-get-account-list - /./TC_email_service/TC_Account/uts-email-free-account - /./TC_email_service/TC_Account/uts-email-delete-account - /./TC_email_service/TC_Rule/uts-email-add-rule - /./TC_email_service/TC_Rule/uts-email-get-rule - /./TC_email_service/TC_Rule/uts-email-get-rule-list - /./TC_email_service/TC_Rule/uts-email-update-rule - /./TC_email_service/TC_Rule/uts-email-free-rule - /./TC_email_service/TC_Rule/uts-email-delete-rule - /./TC_email_service/TC_Network/uts_email_get_network_status - /./TC_email_service/TC_Network/uts_email_get_pending_job - /./TC_email_service/TC_Network/uts_email_send_mail - /./TC_email_service/TC_Network/uts_email_send_saved - /./TC_email_service/TC_Network/uts_email_sync_header - /./TC_email_service/TC_Network/uts_email_sync_header_for_all_account - /./TC_email_service/TC_Network/uts_email_download_body - /./TC_email_service/TC_Network/uts_email_download_attachment - /./TC_email_service/TC_Network/uts_email_get_imap_folder_list - /./TC_email_service/TC_Network/uts_email_cancel_job - /./TC_email_service/TC_Init/uts-email-service-begin - /./TC_email_service/TC_Init/uts-email-open-db - /./TC_email_service/TC_Init/uts-email-init-storage - /./TC_email_service/TC_Init/uts-email-ping-service - /./TC_email_service/TC_Init/uts-email-close-db - /./TC_email_service/TC_Init/uts-email-service-end - "Completed Full Test Suite" -# EOF diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg deleted file mode 100755 index 225bf4d..0000000 --- a/TC/tetbuild.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# TETware Training Course -# Build mode configuration file for Exercise 1 - -# An example build mode configuration -# that uses make as the build tool -# and -f makefile as the arguments to -# the build tool. - -TET_BUILD_TOOL=make -TET_BUILD_FILE=-f Makefile - -# Clearly, make doesn't use the TETware API when printing messages - -# it just writes messages on stdout or stderr. -# So we must tell tcc to execute make with output capture mode enabled. -# When make is executed, stdout and stderr is captured and written to -# the journal. - -TET_OUTPUT_CAPTURE=True - -# we just want make -f makefile executed; -# if the following was set to true , then -# it would be make -f makefile tc1 etc... - -TET_PASS_TC_NAME=True - diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg deleted file mode 100755 index 9038770..0000000 --- a/TC/tetclean.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# TETware Training Course -# Clean mode configuration file for Exercise 1 - -# Use "make clean" to clean up each test case. -TET_CLEAN_TOOL=make clean -TET_CLEAN_FILE=Makefile -# Tell tcc to execute make with output capture mode enabled -TET_OUTPUT_CAPTURE=True -# don't want to pass the test case name to the clean tool -TET_PASS_TC_NAME=True -TET_API_COMPLAINT=True - diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg deleted file mode 100755 index 673f800..0000000 --- a/TC/tetexec.cfg +++ /dev/null @@ -1,16 +0,0 @@ -# TETware Training Course -# Execute mode configuration file for Exercise 1 - -# TET_OUTPUT_CAPTURE specifies whether or not tcc should capture standard -# output and standard error output from test cases -# and record it in the journal. -# Test cases in this test suite are API-conforming test cases, so they -# will use API functions to write to the journal. - -# Setting TET_OUTPUT_CAPTURE to False provides a default value -# of True for TET_API_COMPLIANT - -TET_OUTPUT_CAPTURE=False -TET_API_COMPLAINT=True -TET_PASS_TC_NAME=True - diff --git a/TC/tslist.txt b/TC/tslist.txt deleted file mode 100755 index 8826d6f..0000000 --- a/TC/tslist.txt +++ /dev/null @@ -1,6 +0,0 @@ -./TC_email_service/TC_Folder/tslist -./TC_email_service/TC_Message/tslist -./TC_email_service/TC_Account/tslist -./TC_email_service/TC_Rule/tslist -./TC_email_service/TC_Network/tslist -./TC_email_service/TC_Init/tslist -- 2.7.4