1 /*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #include <zephyr/kernel.h>
8 #include <zephyr/bluetooth/buf.h>
9 #include "mocks/hci_core.h"
10 #include "mocks/hci_core_expects.h"
11
expect_single_call_bt_unpair(uint8_t id,const bt_addr_le_t * addr)12 void expect_single_call_bt_unpair(uint8_t id, const bt_addr_le_t *addr)
13 {
14 const char *func_name = "bt_unpair";
15
16 zassert_equal(bt_unpair_fake.call_count, 1, "'%s()' was called more than once",
17 func_name);
18
19 zassert_equal(bt_unpair_fake.arg0_val, id,
20 "'%s()' was called with incorrect '%s' value", func_name, "id");
21 zassert_mem_equal(bt_unpair_fake.arg1_val, addr, sizeof(bt_addr_le_t),
22 "'%s()' was called with incorrect '%s' value", func_name, "addr");
23 }
24
expect_not_called_bt_unpair(void)25 void expect_not_called_bt_unpair(void)
26 {
27 const char *func_name = "bt_unpair";
28
29 zassert_equal(bt_unpair_fake.call_count, 0, "'%s()' was called unexpectedly",
30 func_name);
31 }
32