1bd42b5e6aead1a4cc46e0fd8e3d47310ce8b519
[framework/messaging/msg-service.git] / TC / msgTC / MapiStorage / utc_msg_release_folder_list.c
1  /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the "License");
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *    http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17 #include "utc_msg_release_folder_list.h"
18
19 static MSG_HANDLE_T msgHandle = NULL;
20 msg_message_t msgInfo;
21 MSG_SENDINGOPT_S sendOpt;
22
23 void startup(void)
24 {
25         MSG_ERROR_T err = MSG_SUCCESS;
26
27         err = msg_open_msg_handle(&msgHandle);
28         if (err != MSG_SUCCESS)
29         {
30                 tet_result(TET_FAIL);
31                 return;
32         }
33
34         msgInfo = msg_new_message();
35
36         memset(&sendOpt, 0x00, sizeof(sendOpt));
37
38         sendOpt.bSetting = false;
39
40         msg_add_message(msgHandle, msgInfo, &sendOpt);
41
42         msg_set_message_id(msgInfo, 0);
43 }
44 void cleanup(void)
45 {
46         msg_close_msg_handle(&msgHandle);
47 }
48
49 void utc_msg_release_folder_list_001()
50 {
51         MSG_ERROR_T err = MSG_SUCCESS;
52         MSG_FOLDER_LIST_S folder_list;
53
54         memset(&folder_list, 0x00, sizeof(folder_list));
55
56         msg_get_folder_list(msgHandle, &folder_list);
57         msg_release_folder_list(&folder_list);
58         if (err != MSG_SUCCESS)
59         {
60                 tet_result(TET_FAIL);
61                 return;
62         }
63
64         tet_result(TET_PASS);
65 }
66
67 void utc_msg_release_folder_list_002()
68 {
69         MSG_ERROR_T err = -1;
70         MSG_FOLDER_LIST_S folder_list;
71
72         memset(&folder_list, 0x00, sizeof(folder_list));
73
74         //err = msg_get_folder_list(NULL, &folder_list);
75         //msg_release_folder_list(&folder_list);
76         if (err != MSG_SUCCESS)
77         {
78                 tet_result(TET_PASS);
79                 return;
80         }
81
82         tet_result(TET_FAIL);
83 }