1 /*
2  * Copyright (c) 2022 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include "mocks/rpa.h"
8 #include "mocks/rpa_expects.h"
9 
10 #include <zephyr/kernel.h>
11 
expect_single_call_bt_rpa_create(const uint8_t irk[16])12 void expect_single_call_bt_rpa_create(const uint8_t irk[16])
13 {
14 	const char *func_name = "bt_rpa_create";
15 
16 	zassert_equal(bt_rpa_create_fake.call_count, 1, "'%s()' was called more than once",
17 		      func_name);
18 	zassert_equal(bt_rpa_create_fake.arg0_val, irk,
19 		      "'%s()' was called with incorrect '%s' value", func_name, "irk");
20 	zassert_not_null(bt_rpa_create_fake.arg1_val, "'%s()' was called with incorrect '%s' value",
21 			 func_name, "rpa");
22 }
23 
expect_not_called_bt_rpa_create(void)24 void expect_not_called_bt_rpa_create(void)
25 {
26 	const char *func_name = "bt_rpa_create";
27 
28 	zassert_equal(bt_rpa_create_fake.call_count, 0, "'%s()' was called unexpectedly",
29 		      func_name);
30 }
31