28 const char *
const query_string,
29 void ***
const results) {
39 const unsigned int port) {
57 static void fail_connect_to_customer_database(
void **state) {
70 int customer_ids = 543;
unsigned int get_customer_id_by_name(DatabaseConnection *const connection, const char *const customer_name)
#define cmocka_unit_test(f)
Initializes a CMUnitTest structure.
static void test_connect_to_customer_database(void **state)
static void test_get_customer_id_by_name(void **state)
DatabaseConnection * connect_to_database(const char *const database_url, const unsigned int port)
#define will_return(function, value)
#define cast_ptr_to_largest_integral_type(value)
static unsigned int mock_query_database(DatabaseConnection *const connection, const char *const query_string, void ***const results)
#define cmocka_run_group_tests(group_tests, group_setup, group_teardown)
DatabaseConnection * connect_to_customer_database()
#define mock_ptr_type(type)
#define assert_int_equal(a, b)