OpenDNSSEC-enforcer 2.1.13
test_database_operations.c File Reference
#include "config.h"
#include "../db_configuration.h"
#include "../db_connection.h"
#include "../db_object.h"
#include "CUnit/Basic.h"
#include <string.h>

Go to the source code of this file.

Data Structures

struct  test_t
struct  test_list_t
struct  test2_t

Functions

db_object_t__test_new_object (const db_connection_t *connection)
test_ttest_new (const db_connection_t *connection)
void test_free (test_t *test)
const db_value_ttest_id (const test_t *test)
const char * test_name (const test_t *test)
int test_set_name (test_t *test, const char *name)
int test_from_result (test_t *test, const db_result_t *result)
int test_get_by_name (test_t *test, const char *name)
int test_get_by_id (test_t *test, const db_value_t *id)
int test_create (test_t *test)
int test_update (test_t *test)
int test_delete (test_t *test)
size_t test_count_by_name (test_t *test, const char *name)
size_t test_count_by_id (test_t *test, const db_value_t *id)
test_list_ttest_list_new (const db_connection_t *connection)
void test_list_free (test_list_t *test_list)
int test_list_get (test_list_t *test_list)
const test_ttest_list_begin (test_list_t *test_list)
const test_ttest_list_next (test_list_t *test_list)
db_object_t__test2_new_object (const db_connection_t *connection)
test2_ttest2_new (const db_connection_t *connection)
void test2_free (test2_t *test2)
const db_value_ttest2_id (const test2_t *test2)
const char * test2_name (const test2_t *test2)
int test2_set_name (test2_t *test2, const char *name)
int test2_from_result (test2_t *test2, const db_result_t *result)
int test2_get_by_name (test2_t *test2, const char *name)
int test2_get_by_id (test2_t *test2, const db_value_t *id)
int test2_create (test2_t *test2)
int test2_update (test2_t *test2)
int test2_delete (test2_t *test2)
int clean_suite_database_operations (void)
void __check_id (const db_value_t *id, int id_int, const char *id_text)
void test_database_operations_read_object1 (void)
void test_database_operations_create_object2 (void)
void test_database_operations_read_object2 (void)
void test_database_operations_update_object2 (void)
void test_database_operations_delete_object2 (void)
void test_database_operations_create_object3 (void)
void test_database_operations_delete_object3 (void)
void test_database_operations_read_all (void)
void test_database_operations_count (void)
void test_database_operations_read_object1_2 (void)
void test_database_operations_create_object2_2 (void)
void test_database_operations_read_object2_2 (void)
void test_database_operations_update_object2_2 (void)
void test_database_operations_update_objects_revisions (void)
void test_database_operations_delete_object2_2 (void)
void test_database_operations_create_object3_2 (void)
void test_database_operations_delete_object3_2 (void)

Function Documentation

◆ __check_id()

◆ __test2_new_object()

◆ __test_new_object()

◆ clean_suite_database_operations()

int clean_suite_database_operations ( void )

◆ test2_create()

◆ test2_delete()

◆ test2_free()

◆ test2_from_result()

int test2_from_result ( test2_t * test2,
const db_result_t * result )

◆ test2_get_by_id()

◆ test2_get_by_name()

◆ test2_id()

◆ test2_name()

◆ test2_new()

◆ test2_set_name()

◆ test2_update()

◆ test_count_by_id()

◆ test_count_by_name()

◆ test_create()

◆ test_database_operations_count()

void test_database_operations_count ( void )

Definition at line 1187 of file test_database_operations.c.

References test_count_by_id(), test_count_by_name(), test_free(), and test_new().

Referenced by main().

◆ test_database_operations_create_object2()

void test_database_operations_create_object2 ( void )

◆ test_database_operations_create_object2_2()

void test_database_operations_create_object2_2 ( void )

◆ test_database_operations_create_object3()

void test_database_operations_create_object3 ( void )

◆ test_database_operations_create_object3_2()

void test_database_operations_create_object3_2 ( void )

◆ test_database_operations_delete_object2()

void test_database_operations_delete_object2 ( void )

Definition at line 1114 of file test_database_operations.c.

References test_delete(), test_free(), test_get_by_id(), and test_new().

Referenced by main().

◆ test_database_operations_delete_object2_2()

void test_database_operations_delete_object2_2 ( void )

Definition at line 1300 of file test_database_operations.c.

References test2_delete(), test2_free(), test2_get_by_id(), and test2_new().

Referenced by main().

◆ test_database_operations_delete_object3()

void test_database_operations_delete_object3 ( void )

Definition at line 1152 of file test_database_operations.c.

References test_delete(), test_free(), test_get_by_id(), and test_new().

Referenced by main().

◆ test_database_operations_delete_object3_2()

void test_database_operations_delete_object3_2 ( void )

Definition at line 1338 of file test_database_operations.c.

References test2_delete(), test2_free(), test2_get_by_id(), and test2_new().

Referenced by main().

◆ test_database_operations_read_all()

void test_database_operations_read_all ( void )

◆ test_database_operations_read_object1()

void test_database_operations_read_object1 ( void )

Definition at line 1047 of file test_database_operations.c.

References __check_id(), test_free(), test_get_by_name(), test_id(), test_name(), and test_new().

Referenced by main().

◆ test_database_operations_read_object1_2()

void test_database_operations_read_object1_2 ( void )

◆ test_database_operations_read_object2()

void test_database_operations_read_object2 ( void )

Definition at line 1080 of file test_database_operations.c.

References db_value_cmp(), test_free(), test_get_by_id(), test_id(), test_name(), and test_new().

Referenced by main().

◆ test_database_operations_read_object2_2()

void test_database_operations_read_object2_2 ( void )

◆ test_database_operations_update_object2()

void test_database_operations_update_object2 ( void )

◆ test_database_operations_update_object2_2()

void test_database_operations_update_object2_2 ( void )

◆ test_database_operations_update_objects_revisions()

void test_database_operations_update_objects_revisions ( void )

◆ test_delete()

◆ test_free()

◆ test_from_result()

◆ test_get_by_id()

◆ test_get_by_name()

◆ test_id()

◆ test_list_begin()

const test_t * test_list_begin ( test_list_t * test_list)

◆ test_list_free()

void test_list_free ( test_list_t * test_list)

◆ test_list_get()

int test_list_get ( test_list_t * test_list)

◆ test_list_new()

test_list_t * test_list_new ( const db_connection_t * connection)

Definition at line 388 of file test_database_operations.c.

References __test_new_object().

Referenced by test_database_operations_read_all().

◆ test_list_next()

const test_t * test_list_next ( test_list_t * test_list)

◆ test_name()

◆ test_new()

◆ test_set_name()

◆ test_update()