1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//base/notification/distributed_notification_service/notification.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17 18module_output_path = "${component_name}/unittest" 19 20ohos_unittest("ans_reminder_unit_test") { 21 module_out_path = module_output_path 22 23 include_dirs = [ 24 ".", 25 "include", 26 "/${services_path}/ans/include", 27 "${services_path}/ans/test/unittest/mock/include", 28 "${ffrt_path}/interfaces/kits", 29 ] 30 31 sources = [ 32 "${frameworks_module_ans_path}/test/unittest/ans_log_test.cpp", 33 "${frameworks_module_ans_path}/test/unittest/enabled_notification_callback_data_test.cpp", 34 "${frameworks_module_ans_path}/test/unittest/message_user_test.cpp", 35 "${frameworks_module_ans_path}/test/unittest/notification_action_button_test.cpp", 36 "${frameworks_module_ans_path}/test/unittest/notification_bundle_option_test.cpp", 37 "${frameworks_module_ans_path}/test/unittest/notification_button_option_test.cpp", 38 "${frameworks_module_ans_path}/test/unittest/notification_capsule_test.cpp", 39 "${frameworks_module_ans_path}/test/unittest/notification_check_info_test.cpp", 40 "${frameworks_module_ans_path}/test/unittest/notification_content_test.cpp", 41 "${frameworks_module_ans_path}/test/unittest/notification_conversational_content_test.cpp", 42 "${frameworks_module_ans_path}/test/unittest/notification_conversational_message_test.cpp", 43 "${frameworks_module_ans_path}/test/unittest/notification_do_not_disturb_date_test.cpp", 44 "${frameworks_module_ans_path}/test/unittest/notification_flags_test.cpp", 45 "${frameworks_module_ans_path}/test/unittest/notification_helper_test.cpp", 46 "${frameworks_module_ans_path}/test/unittest/notification_live_view_content_test.cpp", 47 "${frameworks_module_ans_path}/test/unittest/notification_local_live_view_button_test.cpp", 48 "${frameworks_module_ans_path}/test/unittest/notification_local_live_view_content_test.cpp", 49 "${frameworks_module_ans_path}/test/unittest/notification_long_text_content_test.cpp", 50 "${frameworks_module_ans_path}/test/unittest/notification_media_content_test.cpp", 51 "${frameworks_module_ans_path}/test/unittest/notification_multiline_content_test.cpp", 52 "${frameworks_module_ans_path}/test/unittest/notification_picture_content_test.cpp", 53 "${frameworks_module_ans_path}/test/unittest/notification_progress_test.cpp", 54 "${frameworks_module_ans_path}/test/unittest/notification_request_test.cpp", 55 "${frameworks_module_ans_path}/test/unittest/notification_sorting_map_test.cpp", 56 "${frameworks_module_ans_path}/test/unittest/notification_sorting_test.cpp", 57 "${frameworks_module_ans_path}/test/unittest/notification_subscribe_info_test.cpp", 58 "${frameworks_module_ans_path}/test/unittest/notification_template_test.cpp", 59 "${frameworks_module_ans_path}/test/unittest/notification_test.cpp", 60 "${frameworks_module_ans_path}/test/unittest/notification_time_test.cpp", 61 "${frameworks_module_ans_path}/test/unittest/notification_user_input_test.cpp", 62 "${frameworks_module_ans_path}/test/unittest/reminder_helper_test.cpp", 63 "${frameworks_module_ans_path}/test/unittest/reminder_request_alarm_test.cpp", 64 "${frameworks_module_ans_path}/test/unittest/reminder_request_calendar_test.cpp", 65 "${frameworks_module_ans_path}/test/unittest/reminder_request_timer_test.cpp", 66 "${frameworks_module_ans_path}/test/unittest/reminder_store_test.cpp", 67 ] 68 69 deps = [ 70 "${frameworks_module_ans_path}:ans_innerkits", 71 "//third_party/googletest:gtest_main", 72 ] 73 74 external_deps = [ 75 "ability_base:want", 76 "ability_base:zuri", 77 "ability_runtime:wantagent_innerkits", 78 "access_token:libnativetoken", 79 "access_token:libtoken_setproc", 80 "bundle_framework:appexecfwk_base", 81 "bundle_framework:appexecfwk_core", 82 "c_utils:utils", 83 "common_event_service:cesfwk_innerkits", 84 "eventhandler:libeventhandler", 85 "hilog:libhilog", 86 "hitrace:hitrace_meter", 87 "image_framework:image_native", 88 "ipc:ipc_core", 89 "kv_store:distributeddata_inner", 90 "relational_store:native_rdb", 91 "safwk:system_ability_fwk", 92 "samgr:samgr_proxy", 93 ] 94 95 subsystem_name = "${subsystem_name}" 96 part_name = "${component_name}" 97} 98 99ohos_unittest("reminder_request_test") { 100 module_out_path = module_output_path 101 102 include_dirs = [ 103 ".", 104 "include", 105 "/${services_path}/ans/include", 106 "${services_path}/ans/test/unittest/mock/include", 107 ] 108 109 sources = [ 110 "${frameworks_module_ans_path}/test/unittest/reminder_request_branch_test/mock_reminder_request.cpp", 111 "${frameworks_module_ans_path}/test/unittest/reminder_request_test.cpp", 112 ] 113 114 deps = [ 115 "${frameworks_module_ans_path}:ans_innerkits", 116 "//third_party/googletest:gtest_main", 117 ] 118 119 external_deps = [ 120 "ability_base:want", 121 "ability_base:zuri", 122 "c_utils:utils", 123 "relational_store:native_rdb", 124 ] 125 126 subsystem_name = "${subsystem_name}" 127 part_name = "${component_name}" 128} 129 130ohos_unittest("reminder_request_branch_test") { 131 module_out_path = module_output_path 132 133 include_dirs = [ 134 ".", 135 "include", 136 "/${services_path}/ans/include", 137 "${services_path}/ans/test/unittest/mock/include", 138 ] 139 140 sources = [ 141 "${frameworks_module_ans_path}/test/unittest/reminder_request_branch_test/mock_reminder_request.cpp", 142 "${frameworks_module_ans_path}/test/unittest/reminder_request_branch_test/reminder_request_branch_test.cpp", 143 ] 144 145 deps = [ 146 "${frameworks_module_ans_path}:ans_innerkits", 147 "//third_party/googletest:gtest_main", 148 ] 149 150 external_deps = [ 151 "ability_base:want", 152 "ability_base:zuri", 153 "c_utils:utils", 154 "relational_store:native_rdb", 155 ] 156 157 subsystem_name = "${subsystem_name}" 158 part_name = "${component_name}" 159} 160 161group("unittest") { 162 testonly = true 163 deps = [ 164 ":ans_reminder_unit_test", 165 ":reminder_request_branch_test", 166 ":reminder_request_test", 167 ] 168} 169