update tizen source
[framework/messaging/msg-service.git] / TC / msgTC / MapiStorage / utc_msg_release_thread_view_list.c
1 /*\r
2 *\r
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.\r
4 *\r
5 * This file is part of msg-service.\r
6 *\r
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>\r
8 *          Sangkoo Kim <sangkoo.kim@samsung.com>\r
9 *          Seunghwan Lee <sh.cat.lee@samsung.com>\r
10 *          SoonMin Jung <sm0415.jung@samsung.com>\r
11 *          Jae-Young Lee <jy4710.lee@samsung.com>\r
12 *          KeeBum Kim <keebum.kim@samsung.com>\r
13 *\r
14 * PROPRIETARY/CONFIDENTIAL\r
15 *\r
16 * This software is the confidential and proprietary information of\r
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not\r
18 * disclose such Confidential Information and shall use it only in\r
19 * accordance with the terms of the license agreement you entered\r
20 * into with SAMSUNG ELECTRONICS.\r
21 *\r
22 * SAMSUNG make no representations or warranties about the suitability\r
23 * of the software, either express or implied, including but not limited\r
24 * to the implied warranties of merchantability, fitness for a particular\r
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any\r
26 * damages suffered by licensee as a result of using, modifying or\r
27 * distributing this software or its derivatives.\r
28 *\r
29 */
30
31 #include "utc_msg_release_thread_view_list.h"\r
32 \r
33 static MSG_HANDLE_T msgHandle = NULL;\r
34 msg_message_t msgInfo;\r
35 MSG_SENDINGOPT_S sendOpt;\r
36 MSG_THREAD_VIEW_LIST_S msg_thread_view_list;\r
37 \r
38 void startup(void)\r
39 {\r
40         MSG_ERROR_T err = MSG_SUCCESS;\r
41         MSG_SORT_RULE_S sort_rule;\r
42 \r
43         err = msg_open_msg_handle(&msgHandle);\r
44         if (err != MSG_SUCCESS)\r
45         {\r
46                 tet_result(TET_FAIL);\r
47                 return;\r
48         }\r
49 \r
50         msgInfo = msg_new_message();\r
51 \r
52         memset(&sendOpt, 0x00, sizeof(sendOpt));\r
53 \r
54         sendOpt.bSetting = false;\r
55 \r
56         msg_add_message(msgHandle, msgInfo, &sendOpt);\r
57 \r
58         msg_set_message_id(msgInfo, 0);\r
59 \r
60         memset(&msg_thread_view_list, 0x00, sizeof(msg_thread_view_list));\r
61         memset(&sort_rule, 0x00, sizeof(sort_rule));\r
62 \r
63         msg_get_thread_view_list(msgHandle, NULL, &msg_thread_view_list);\r
64 }\r
65 void cleanup(void)\r
66 {\r
67         msg_release_thread_view_list(&msg_thread_view_list);\r
68         msg_close_msg_handle(&msgHandle);\r
69 }\r
70 \r
71 void utc_msg_release_thread_view_list_001()\r
72 {\r
73         int err = MSG_SUCCESS;\r
74 \r
75         //msg_release_thread_view_list(&msg_thread_view_list);\r
76         if (err < MSG_SUCCESS)\r
77         {\r
78                 tet_result(TET_FAIL);\r
79                 return;\r
80         }\r
81 \r
82         tet_result(TET_PASS);\r
83 }\r
84 \r
85 void utc_msg_release_thread_view_list_002()\r
86 {\r
87         int err = -1;\r
88 \r
89         //msg_release_thread_view_list(&msg_thread_view_list);\r
90         if (err < MSG_SUCCESS)\r
91         {\r
92                 tet_result(TET_PASS);\r
93                 return;\r
94         }\r
95 \r
96         tet_result(TET_FAIL);\r
97 }