1# Copyright (c) 2022-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("reminder_unit_test") { 21 module_out_path = module_output_path 22 include_dirs = [ 23 ".", 24 "include", 25 "/${services_path}/ans/include", 26 "${services_path}/ans/test/unittest/mock/include", 27 ] 28 29 defines = [] 30 31 sources = [ 32 "mock/blob.cpp", 33 "mock/distributed_kv_data_manager.cpp", 34 "mock/mock_access_token_helper.cpp", 35 "mock/mock_bundle_manager_helper.cpp", 36 "mock/mock_event_handler.cpp", 37 "mock/mock_ipc.cpp", 38 "mock/mock_single_kv_store.cpp", 39 "reminder_data_manager_test.cpp", 40 ] 41 42 deps = [ 43 "${core_path}:ans_core", 44 "${frameworks_module_ans_path}:ans_innerkits", 45 "${services_path}/ans:libans", 46 "//third_party/googletest:gtest_main", 47 ] 48 49 if (distributed_notification_supported) { 50 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 51 deps += [ "${services_path}/distributed:libans_distributed" ] 52 include_dirs += [ "${services_path}/distributed/include" ] 53 } 54 55 external_deps = [ 56 "ability_base:want", 57 "ability_base:zuri", 58 "ability_runtime:ability_manager", 59 "ability_runtime:abilitykit_native", 60 "ability_runtime:app_manager", 61 "ability_runtime:wantagent_innerkits", 62 "access_token:libaccesstoken_sdk", 63 "bundle_framework:appexecfwk_base", 64 "bundle_framework:appexecfwk_core", 65 "c_utils:utils", 66 "common_event_service:cesfwk_innerkits", 67 "device_manager:devicemanagersdk", 68 "eventhandler:libeventhandler", 69 "ffrt:libffrt", 70 "hilog:libhilog", 71 "hitrace:hitrace_meter", 72 "hitrace:libhitracechain", 73 "image_framework:image_native", 74 "ipc:ipc_core", 75 "kv_store:distributeddata_inner", 76 "os_account:os_account_innerkits", 77 "player_framework:media_client", 78 "relational_store:native_rdb", 79 "safwk:system_ability_fwk", 80 "samgr:samgr_proxy", 81 "time_service:time_client", 82 ] 83 84 if (device_usage) { 85 external_deps += [ "device_usage_statistics:usagestatsinner" ] 86 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 87 } 88 89 cflags = [] 90 if (hisysevent_usage) { 91 external_deps += [ "hisysevent:libhisysevent" ] 92 cflags += [ "-DHAS_HISYSEVENT_PART" ] 93 } 94 95 subsystem_name = "${subsystem_name}" 96 part_name = "${component_name}" 97} 98 99ohos_unittest("ans_unit_test") { 100 module_out_path = module_output_path 101 include_dirs = [ 102 ".", 103 "include", 104 "/${services_path}/ans/include", 105 "${services_path}/ans/test/unittest/mock/include", 106 ] 107 108 defines = [] 109 110 sources = [ 111 "${test_path}/mock/mock_tokenid_kit.cpp", 112 "bundle_manager_helper_test.cpp", 113 "mock/blob.cpp", 114 "mock/distributed_kv_data_manager.cpp", 115 "mock/mock_access_token_helper.cpp", 116 "mock/mock_accesstoken_kit.cpp", 117 "mock/mock_bundle_manager_helper.cpp", 118 "mock/mock_event_handler.cpp", 119 "mock/mock_ipc.cpp", 120 "mock/mock_push_callback_stub.cpp", 121 "mock/mock_single_kv_store.cpp", 122 "notification_hisysevent_test.cpp", 123 "notification_preferences_database_test.cpp", 124 "notification_slot_filter_test.cpp", 125 "notification_subscriber_manager_test.cpp", 126 "permission_filter_test.cpp", 127 "system_event_observer_test.cpp", 128 ] 129 130 deps = [ 131 "${core_path}:ans_core", 132 "${services_path}/ans:libans", 133 "//third_party/googletest:gtest_main", 134 ] 135 136 if (distributed_notification_supported) { 137 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 138 deps += [ "${services_path}/distributed:libans_distributed" ] 139 include_dirs += [ "${services_path}/distributed/include" ] 140 } 141 142 external_deps = [ 143 "ability_base:want", 144 "ability_base:zuri", 145 "ability_runtime:abilitykit_native", 146 "ability_runtime:app_manager", 147 "ability_runtime:wantagent_innerkits", 148 "access_token:libaccesstoken_sdk", 149 "bundle_framework:appexecfwk_base", 150 "bundle_framework:appexecfwk_core", 151 "c_utils:utils", 152 "common_event_service:cesfwk_innerkits", 153 "device_manager:devicemanagersdk", 154 "eventhandler:libeventhandler", 155 "ffrt:libffrt", 156 "hilog:libhilog", 157 "hitrace:hitrace_meter", 158 "hitrace:libhitracechain", 159 "image_framework:image_native", 160 "ipc:ipc_core", 161 "kv_store:distributeddata_inner", 162 "os_account:os_account_innerkits", 163 "player_framework:media_client", 164 "relational_store:native_rdb", 165 "safwk:system_ability_fwk", 166 "samgr:samgr_proxy", 167 "time_service:time_client", 168 ] 169 170 if (device_usage) { 171 external_deps += [ "device_usage_statistics:usagestatsinner" ] 172 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 173 } 174 175 cflags = [] 176 if (hisysevent_usage) { 177 external_deps += [ "hisysevent:libhisysevent" ] 178 cflags += [ "-DHAS_HISYSEVENT_PART" ] 179 } 180 181 subsystem_name = "${subsystem_name}" 182 part_name = "${component_name}" 183} 184 185ohos_unittest("notification_service_test") { 186 module_out_path = module_output_path 187 include_dirs = [ 188 ".", 189 "include", 190 "/${services_path}/ans/include", 191 "${services_path}/ans/test/unittest/mock/include", 192 ] 193 194 defines = [] 195 196 sources = [ 197 "${test_path}/mock/mock_tokenid_kit.cpp", 198 "advanced_notification_service_test.cpp", 199 "mock/blob.cpp", 200 "mock/distributed_kv_data_manager.cpp", 201 "mock/mock_access_token_helper.cpp", 202 "mock/mock_accesstoken_kit.cpp", 203 "mock/mock_bundle_manager_helper.cpp", 204 "mock/mock_event_handler.cpp", 205 "mock/mock_ipc.cpp", 206 "mock/mock_push_callback_stub.cpp", 207 "mock/mock_single_kv_store.cpp", 208 ] 209 210 deps = [ 211 "${core_path}:ans_core", 212 "${services_path}/ans:libans", 213 "//third_party/googletest:gtest_main", 214 ] 215 216 if (distributed_notification_supported) { 217 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 218 deps += [ "${services_path}/distributed:libans_distributed" ] 219 include_dirs += [ "${services_path}/distributed/include" ] 220 } 221 222 external_deps = [ 223 "ability_base:want", 224 "ability_base:zuri", 225 "ability_runtime:abilitykit_native", 226 "ability_runtime:app_manager", 227 "ability_runtime:wantagent_innerkits", 228 "access_token:libaccesstoken_sdk", 229 "bundle_framework:appexecfwk_base", 230 "bundle_framework:appexecfwk_core", 231 "c_utils:utils", 232 "common_event_service:cesfwk_innerkits", 233 "device_manager:devicemanagersdk", 234 "eventhandler:libeventhandler", 235 "ffrt:libffrt", 236 "hilog:libhilog", 237 "hitrace:hitrace_meter", 238 "hitrace:libhitracechain", 239 "image_framework:image_native", 240 "ipc:ipc_core", 241 "kv_store:distributeddata_inner", 242 "os_account:os_account_innerkits", 243 "player_framework:media_client", 244 "relational_store:native_rdb", 245 "safwk:system_ability_fwk", 246 "samgr:samgr_proxy", 247 "time_service:time_client", 248 ] 249 250 if (device_usage) { 251 external_deps += [ "device_usage_statistics:usagestatsinner" ] 252 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 253 } 254 255 cflags = [] 256 if (hisysevent_usage) { 257 external_deps += [ "hisysevent:libhisysevent" ] 258 cflags += [ "-DHAS_HISYSEVENT_PART" ] 259 } 260 261 subsystem_name = "${subsystem_name}" 262 part_name = "${component_name}" 263} 264 265ohos_unittest("notification_preferences_test") { 266 module_out_path = module_output_path 267 include_dirs = [ 268 ".", 269 "include", 270 "/${services_path}/ans/include", 271 "${services_path}/ans/test/unittest/mock/include", 272 ] 273 274 defines = [] 275 276 sources = [ 277 "${test_path}/mock/mock_tokenid_kit.cpp", 278 "advanced_notification_service_ability_test.cpp", 279 "mock/blob.cpp", 280 "mock/distributed_kv_data_manager.cpp", 281 "mock/mock_access_token_helper.cpp", 282 "mock/mock_accesstoken_kit.cpp", 283 "mock/mock_bundle_manager_helper.cpp", 284 "mock/mock_event_handler.cpp", 285 "mock/mock_ipc.cpp", 286 "mock/mock_push_callback_stub.cpp", 287 "mock/mock_single_kv_store.cpp", 288 "notification_preferences_test.cpp", 289 ] 290 291 deps = [ 292 "${core_path}:ans_core", 293 "${services_path}/ans:libans", 294 "//third_party/googletest:gtest_main", 295 ] 296 297 if (distributed_notification_supported) { 298 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 299 deps += [ "${services_path}/distributed:libans_distributed" ] 300 include_dirs += [ "${services_path}/distributed/include" ] 301 } 302 303 external_deps = [ 304 "ability_base:want", 305 "ability_base:zuri", 306 "ability_runtime:abilitykit_native", 307 "ability_runtime:app_manager", 308 "ability_runtime:wantagent_innerkits", 309 "access_token:libaccesstoken_sdk", 310 "bundle_framework:appexecfwk_base", 311 "bundle_framework:appexecfwk_core", 312 "c_utils:utils", 313 "common_event_service:cesfwk_innerkits", 314 "device_manager:devicemanagersdk", 315 "eventhandler:libeventhandler", 316 "ffrt:libffrt", 317 "hilog:libhilog", 318 "hitrace:hitrace_meter", 319 "hitrace:libhitracechain", 320 "image_framework:image_native", 321 "ipc:ipc_core", 322 "kv_store:distributeddata_inner", 323 "os_account:os_account_innerkits", 324 "player_framework:media_client", 325 "relational_store:native_rdb", 326 "safwk:system_ability_fwk", 327 "samgr:samgr_proxy", 328 "time_service:time_client", 329 ] 330 331 if (device_usage) { 332 external_deps += [ "device_usage_statistics:usagestatsinner" ] 333 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 334 } 335 336 cflags = [] 337 if (hisysevent_usage) { 338 external_deps += [ "hisysevent:libhisysevent" ] 339 cflags += [ "-DHAS_HISYSEVENT_PART" ] 340 } 341 342 subsystem_name = "${subsystem_name}" 343 part_name = "${component_name}" 344} 345 346ohos_unittest("access_token_helper_test") { 347 module_out_path = module_output_path 348 include_dirs = [ 349 ".", 350 "include", 351 "/${services_path}/ans/include", 352 "${services_path}/ans/test/unittest/mock/include", 353 ] 354 355 sources = [ 356 "${services_path}/ans/src/access_token_helper.cpp", 357 "${services_path}/ans/test/unittest/mock/mock_accesstoken_kit.cpp", 358 "${test_path}/mock/mock_tokenid_kit.cpp", 359 "access_token_helper_test/access_token_helper_test.cpp", 360 ] 361 362 deps = [ "${core_path}:ans_core" ] 363 364 external_deps = [ 365 "ability_base:want", 366 "ability_base:zuri", 367 "ability_runtime:abilitykit_native", 368 "ability_runtime:app_manager", 369 "ability_runtime:wantagent_innerkits", 370 "access_token:libaccesstoken_sdk", 371 "access_token:libtokenid_sdk", 372 "bundle_framework:appexecfwk_base", 373 "bundle_framework:appexecfwk_core", 374 "c_utils:utils", 375 "common_event_service:cesfwk_innerkits", 376 "eventhandler:libeventhandler", 377 "hilog:libhilog", 378 "hitrace:hitrace_meter", 379 "hitrace:libhitracechain", 380 "image_framework:image_native", 381 "ipc:ipc_core", 382 "kv_store:distributeddata_inner", 383 "os_account:os_account_innerkits", 384 "player_framework:media_client", 385 "relational_store:native_rdb", 386 "safwk:system_ability_fwk", 387 "samgr:samgr_proxy", 388 "time_service:time_client", 389 ] 390 391 subsystem_name = "${subsystem_name}" 392 part_name = "${component_name}" 393} 394 395ohos_unittest("bundle_manager_helper_branch_test") { 396 module_out_path = module_output_path 397 include_dirs = [ 398 ".", 399 "include", 400 "/${services_path}/ans/include", 401 "${services_path}/ans/test/unittest/mock/include", 402 ] 403 404 sources = [ 405 "bundle_manager_helper_branch_test/bundle_manager_helper_branch_test.cpp", 406 "bundle_manager_helper_branch_test/mock_service_registry.cpp", 407 ] 408 409 deps = [ 410 "${core_path}:ans_core", 411 "${frameworks_module_ans_path}:ans_innerkits", 412 "${services_path}/ans:libans", 413 "//third_party/googletest:gtest_main", 414 ] 415 416 external_deps = [ 417 "ability_base:want", 418 "ability_base:zuri", 419 "ability_runtime:abilitykit_native", 420 "ability_runtime:app_manager", 421 "ability_runtime:wantagent_innerkits", 422 "access_token:libaccesstoken_sdk", 423 "bundle_framework:appexecfwk_base", 424 "bundle_framework:appexecfwk_core", 425 "c_utils:utils", 426 "common_event_service:cesfwk_innerkits", 427 "eventhandler:libeventhandler", 428 "hilog:libhilog", 429 "hitrace:hitrace_meter", 430 "hitrace:libhitracechain", 431 "image_framework:image_native", 432 "ipc:ipc_core", 433 "kv_store:distributeddata_inner", 434 "os_account:os_account_innerkits", 435 "player_framework:media_client", 436 "relational_store:native_rdb", 437 "safwk:system_ability_fwk", 438 "samgr:samgr_proxy", 439 "time_service:time_client", 440 ] 441 442 subsystem_name = "${subsystem_name}" 443 part_name = "${component_name}" 444} 445 446ohos_unittest("notification_dialog_test") { 447 module_out_path = module_output_path 448 include_dirs = [ 449 ".", 450 "include", 451 "/${services_path}/ans/include", 452 "${services_path}/ans/test/unittest/mock/include", 453 ] 454 455 sources = [ 456 "notification_dialog_test/mock_os_account_manager_annex.cpp", 457 "notification_dialog_test/notification_dialog_test.cpp", 458 ] 459 460 deps = [ 461 "${core_path}:ans_core", 462 "${frameworks_module_ans_path}:ans_innerkits", 463 "${services_path}/ans:libans", 464 "//third_party/googletest:gtest_main", 465 ] 466 467 external_deps = [ 468 "ability_base:want", 469 "ability_base:zuri", 470 "ability_runtime:abilitykit_native", 471 "ability_runtime:app_manager", 472 "ability_runtime:wantagent_innerkits", 473 "access_token:libaccesstoken_sdk", 474 "bundle_framework:appexecfwk_base", 475 "bundle_framework:appexecfwk_core", 476 "c_utils:utils", 477 "common_event_service:cesfwk_innerkits", 478 "eventhandler:libeventhandler", 479 "hilog:libhilog", 480 "hitrace:hitrace_meter", 481 "hitrace:libhitracechain", 482 "image_framework:image_native", 483 "ipc:ipc_core", 484 "kv_store:distributeddata_inner", 485 "os_account:os_account_innerkits", 486 "player_framework:media_client", 487 "relational_store:native_rdb", 488 "safwk:system_ability_fwk", 489 "samgr:samgr_proxy", 490 "time_service:time_client", 491 ] 492 493 subsystem_name = "${subsystem_name}" 494 part_name = "${component_name}" 495} 496 497ohos_unittest("notification_subscriber_manager_branch_test") { 498 module_out_path = module_output_path 499 include_dirs = [ 500 ".", 501 "include", 502 "/${services_path}/ans/include", 503 "${services_path}/ans/test/unittest/mock/include", 504 "${ffrt_path}/interfaces/kits", 505 ] 506 507 defines = [] 508 509 sources = [ 510 "${test_path}/mock/mock_tokenid_kit.cpp", 511 "mock/mock_bundle_manager_helper.cpp", 512 "mock/mock_ipc.cpp", 513 "notification_subscriber_manager_branch_test/mock_access_token_helper.cpp", 514 "notification_subscriber_manager_branch_test/mock_notification.cpp", 515 "notification_subscriber_manager_branch_test/mock_notification_preferences.cpp", 516 "notification_subscriber_manager_branch_test/mock_os_account_manager.cpp", 517 "notification_subscriber_manager_branch_test/notification_subscriber_manager_branch_test.cpp", 518 ] 519 520 deps = [ 521 "${core_path}:ans_core", 522 "${frameworks_module_ans_path}:ans_innerkits", 523 "${services_path}/ans:libans", 524 "//third_party/googletest:gtest_main", 525 ] 526 527 if (distributed_notification_supported) { 528 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 529 deps += [ "${services_path}/distributed:libans_distributed" ] 530 include_dirs += [ "${services_path}/distributed/include" ] 531 } 532 533 external_deps = [ 534 "ability_base:want", 535 "ability_base:zuri", 536 "ability_runtime:abilitykit_native", 537 "ability_runtime:app_manager", 538 "ability_runtime:wantagent_innerkits", 539 "access_token:libaccesstoken_sdk", 540 "bundle_framework:appexecfwk_base", 541 "bundle_framework:appexecfwk_core", 542 "c_utils:utils", 543 "common_event_service:cesfwk_innerkits", 544 "eventhandler:libeventhandler", 545 "ffrt:libffrt", 546 "hilog:libhilog", 547 "hitrace:hitrace_meter", 548 "hitrace:libhitracechain", 549 "image_framework:image_native", 550 "ipc:ipc_core", 551 "kv_store:distributeddata_inner", 552 "os_account:os_account_innerkits", 553 "player_framework:media_client", 554 "relational_store:native_rdb", 555 "safwk:system_ability_fwk", 556 "samgr:samgr_proxy", 557 "time_service:time_client", 558 ] 559 560 subsystem_name = "${subsystem_name}" 561 part_name = "${component_name}" 562} 563 564ohos_unittest("advanced_notification_service_branch_test") { 565 module_out_path = module_output_path 566 include_dirs = [ 567 ".", 568 "include", 569 "/${services_path}/ans/include", 570 "${services_path}/ans/test/unittest/mock/include", 571 "${ffrt_path}/interfaces/kits", 572 ] 573 574 defines = [] 575 576 sources = [ 577 "${test_path}/mock/mock_tokenid_kit.cpp", 578 "advanced_notification_service_branch_test.cpp", 579 "mock/blob.cpp", 580 "mock/distributed_kv_data_manager.cpp", 581 "mock/mock_accesstoken_kit.cpp", 582 "mock/mock_advanced_notification_service.cpp", 583 "mock/mock_bundle_manager_helper.cpp", 584 "mock/mock_event_handler.cpp", 585 "mock/mock_ipc.cpp", 586 "mock/mock_single_kv_store.cpp", 587 "notification_dialog_test/mock_os_account_manager_annex.cpp", 588 "notification_subscriber_manager_branch_test/mock_access_token_helper.cpp", 589 ] 590 591 deps = [ 592 "${core_path}:ans_core", 593 "${frameworks_module_ans_path}:ans_innerkits", 594 "${services_path}/ans:libans", 595 "//third_party/googletest:gtest_main", 596 ] 597 598 if (distributed_notification_supported) { 599 defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ] 600 deps += [ "${services_path}/distributed:libans_distributed" ] 601 include_dirs += [ "${services_path}/distributed/include" ] 602 } 603 604 external_deps = [ 605 "ability_base:want", 606 "ability_base:zuri", 607 "ability_runtime:abilitykit_native", 608 "ability_runtime:app_manager", 609 "ability_runtime:wantagent_innerkits", 610 "access_token:libaccesstoken_sdk", 611 "bundle_framework:appexecfwk_base", 612 "bundle_framework:appexecfwk_core", 613 "c_utils:utils", 614 "common_event_service:cesfwk_innerkits", 615 "eventhandler:libeventhandler", 616 "ffrt:libffrt", 617 "hilog:libhilog", 618 "hitrace:hitrace_meter", 619 "hitrace:libhitracechain", 620 "image_framework:image_native", 621 "ipc:ipc_core", 622 "kv_store:distributeddata_inner", 623 "os_account:os_account_innerkits", 624 "player_framework:media_client", 625 "relational_store:native_rdb", 626 "safwk:system_ability_fwk", 627 "samgr:samgr_proxy", 628 "time_service:time_client", 629 ] 630 631 subsystem_name = "${subsystem_name}" 632 part_name = "${component_name}" 633} 634 635ohos_unittest("notification_preferences_database_branch_test") { 636 module_out_path = module_output_path 637 include_dirs = [ 638 ".", 639 "include", 640 "/${services_path}/ans/include", 641 "${services_path}/ans/test/unittest/mock/include", 642 ] 643 644 sources = [ 645 "notification_preferences_database_branch_test/mock_notification_rdb_data_mgr.cpp", 646 "notification_preferences_database_branch_test/notification_preferences_database_branch_test.cpp", 647 ] 648 649 deps = [ 650 "${core_path}:ans_core", 651 "${frameworks_module_ans_path}:ans_innerkits", 652 "${services_path}/ans:libans", 653 "//third_party/googletest:gtest_main", 654 ] 655 656 external_deps = [ 657 "ability_base:want", 658 "ability_base:zuri", 659 "ability_runtime:abilitykit_native", 660 "ability_runtime:app_manager", 661 "ability_runtime:wantagent_innerkits", 662 "access_token:libaccesstoken_sdk", 663 "bundle_framework:appexecfwk_base", 664 "bundle_framework:appexecfwk_core", 665 "c_utils:utils", 666 "common_event_service:cesfwk_innerkits", 667 "eventhandler:libeventhandler", 668 "hilog:libhilog", 669 "hitrace:hitrace_meter", 670 "hitrace:libhitracechain", 671 "image_framework:image_native", 672 "ipc:ipc_core", 673 "kv_store:distributeddata_inner", 674 "os_account:os_account_innerkits", 675 "player_framework:media_client", 676 "relational_store:native_rdb", 677 "safwk:system_ability_fwk", 678 "samgr:samgr_proxy", 679 "time_service:time_client", 680 ] 681 682 subsystem_name = "${subsystem_name}" 683 part_name = "${component_name}" 684} 685 686ohos_unittest("push_callback_stub_test") { 687 module_out_path = module_output_path 688 include_dirs = [ 689 ".", 690 "include", 691 "/${services_path}/ans/include", 692 ] 693 694 sources = [ "push_callback_stub_test.cpp" ] 695 696 deps = [ 697 "${core_path}:ans_core", 698 "${frameworks_module_ans_path}:ans_innerkits", 699 "${services_path}/ans:libans", 700 "//third_party/googletest:gtest_main", 701 ] 702 703 external_deps = [ 704 "ability_base:want", 705 "ability_base:zuri", 706 "ability_runtime:abilitykit_native", 707 "ability_runtime:app_manager", 708 "ability_runtime:wantagent_innerkits", 709 "access_token:libaccesstoken_sdk", 710 "bundle_framework:appexecfwk_base", 711 "bundle_framework:appexecfwk_core", 712 "c_utils:utils", 713 "common_event_service:cesfwk_innerkits", 714 "eventhandler:libeventhandler", 715 "hilog:libhilog", 716 "hitrace:hitrace_meter", 717 "hitrace:libhitracechain", 718 "image_framework:image_native", 719 "ipc:ipc_core", 720 "kv_store:distributeddata_inner", 721 "os_account:os_account_innerkits", 722 "player_framework:media_client", 723 "relational_store:native_rdb", 724 "safwk:system_ability_fwk", 725 "samgr:samgr_proxy", 726 "time_service:time_client", 727 ] 728 729 subsystem_name = "${subsystem_name}" 730 part_name = "${component_name}" 731} 732 733ohos_unittest("notification_rdb_data_mgr_test") { 734 module_out_path = module_output_path 735 include_dirs = [ 736 ".", 737 "include", 738 "/${services_path}/ans/include", 739 "${services_path}/ans/test/unittest/mock/include", 740 ] 741 742 sources = [ 743 "notification_rdb_data_mgr_test/mock_abs_result_set.cpp", 744 "notification_rdb_data_mgr_test/mock_abs_shared_result_set.cpp", 745 "notification_rdb_data_mgr_test/mock_rdb_helper.cpp", 746 "notification_rdb_data_mgr_test/notification_rdb_data_mgr_test.cpp", 747 ] 748 749 deps = [ 750 "${core_path}:ans_core", 751 "${frameworks_module_ans_path}:ans_innerkits", 752 "${services_path}/ans:libans", 753 "//third_party/googletest:gtest_main", 754 ] 755 756 external_deps = [ 757 "ability_base:want", 758 "ability_base:zuri", 759 "ability_runtime:abilitykit_native", 760 "ability_runtime:app_manager", 761 "ability_runtime:wantagent_innerkits", 762 "access_token:libaccesstoken_sdk", 763 "bundle_framework:appexecfwk_base", 764 "bundle_framework:appexecfwk_core", 765 "c_utils:utils", 766 "common_event_service:cesfwk_innerkits", 767 "eventhandler:libeventhandler", 768 "hilog:libhilog", 769 "hitrace:hitrace_meter", 770 "hitrace:libhitracechain", 771 "image_framework:image_native", 772 "ipc:ipc_core", 773 "kv_store:distributeddata_inner", 774 "os_account:os_account_innerkits", 775 "player_framework:media_client", 776 "relational_store:native_rdb", 777 "safwk:system_ability_fwk", 778 "samgr:samgr_proxy", 779 "time_service:time_client", 780 ] 781 782 subsystem_name = "${subsystem_name}" 783 part_name = "${component_name}" 784} 785 786group("unittest") { 787 testonly = true 788 deps = [ 789 ":access_token_helper_test", 790 ":advanced_notification_service_branch_test", 791 ":ans_unit_test", 792 ":bundle_manager_helper_branch_test", 793 ":notification_dialog_test", 794 ":notification_preferences_database_branch_test", 795 ":notification_preferences_test", 796 ":notification_rdb_data_mgr_test", 797 ":notification_service_test", 798 ":notification_subscriber_manager_branch_test", 799 ":push_callback_stub_test", 800 ":reminder_unit_test", 801 ] 802} 803