OpenVPN
|
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <database.h>
Go to the source code of this file.
Functions | |
DatabaseConnection * | connect_to_product_database (void) |
DatabaseConnection * | connect_to_database (const char *const url, const unsigned int port) |
static void | test_connect_to_product_database (void **state) |
static void | test_connect_to_product_database_bad_url (void **state) |
static void | test_connect_to_product_database_missing_parameter (void **state) |
int | main (void) |
DatabaseConnection* connect_to_database | ( | const char *const | url, |
const unsigned int | port | ||
) |
Definition at line 27 of file product_database_test.c.
References check_expected, check_expected_ptr, and mock.
Referenced by test_connect_to_product_database(), test_connect_to_product_database_bad_url(), and test_connect_to_product_database_missing_parameter().
DatabaseConnection* connect_to_product_database | ( | void | ) |
Definition at line 21 of file product_database.c.
References connect_to_database().
Referenced by test_connect_to_product_database(), test_connect_to_product_database_bad_url(), and test_connect_to_product_database_missing_parameter().
int main | ( | void | ) |
Definition at line 65 of file product_database_test.c.
References cmocka_run_group_tests, cmocka_unit_test, test_connect_to_product_database(), test_connect_to_product_database_bad_url(), and test_connect_to_product_database_missing_parameter().
|
static |
Definition at line 34 of file product_database_test.c.
References assert_int_equal, connect_to_database(), connect_to_product_database(), expect_string, expect_value, and will_return.
Referenced by main().
|
static |
Definition at line 45 of file product_database_test.c.
References assert_int_equal, connect_to_database(), connect_to_product_database(), expect_string, expect_value, and will_return.
Referenced by main().
|
static |
Definition at line 57 of file product_database_test.c.
References assert_int_equal, connect_to_database(), connect_to_product_database(), expect_string, and will_return.
Referenced by main().