|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Unit tests for connection_string_builder. More...

Go to the source code of this file.
Macros | |
| #define | TEST_START(name) |
| #define | ASSERT_TRUE(condition, message) |
| #define | ASSERT_FALSE(condition, message) |
| #define | ASSERT_EQ(expected, actual, message) |
| #define | TEST_END() |
Functions | |
| bool | test_postgres_basic () |
| bool | test_postgres_ssl () |
| bool | test_postgres_verify_ca () |
| bool | test_postgres_timeout () |
| bool | test_postgres_app_name () |
| bool | test_postgres_custom_option () |
| bool | test_postgres_empty () |
| bool | test_sqlite_file () |
| bool | test_sqlite_memory () |
| bool | test_sqlite_no_database () |
| bool | test_sqlite_memory_overrides_file () |
| bool | test_mongodb_basic () |
| bool | test_mongodb_with_auth () |
| bool | test_mongodb_default_host () |
| bool | test_mongodb_ssl () |
| bool | test_redis_basic () |
| bool | test_redis_with_password () |
| bool | test_redis_with_database () |
| bool | test_builder_reset () |
| bool | test_builder_chaining () |
| bool | test_builder_reuse () |
| bool | test_builder_copy () |
| int | main () |
Variables | |
| static int | tests_passed = 0 |
| static int | tests_failed = 0 |
Unit tests for connection_string_builder.
Definition in file test_connection_string_builder.cpp.
| #define ASSERT_EQ | ( | expected, | |
| actual, | |||
| message ) |
Definition at line 38 of file test_connection_string_builder.cpp.
Referenced by test_builder_reset(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), test_mongodb_basic(), test_mongodb_with_auth(), test_postgres_empty(), test_redis_basic(), test_redis_with_database(), test_redis_with_password(), test_sqlite_file(), test_sqlite_memory(), and test_sqlite_memory_overrides_file().
| #define ASSERT_FALSE | ( | condition, | |
| message ) |
Definition at line 35 of file test_connection_string_builder.cpp.
| #define ASSERT_TRUE | ( | condition, | |
| message ) |
Definition at line 25 of file test_connection_string_builder.cpp.
Referenced by AsyncStressTest::SetUp(), DataMaskingTest::SetUp(), MemoryStressTest::SetUp(), SQLInjectionTest::SetUp(), test_builder_chaining(), test_builder_copy(), test_builder_reset(), test_builder_reuse(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), test_mongodb_basic(), test_mongodb_default_host(), test_mongodb_ssl(), test_mongodb_with_auth(), test_postgres_app_name(), test_postgres_basic(), test_postgres_custom_option(), test_postgres_empty(), test_postgres_ssl(), test_postgres_timeout(), test_postgres_verify_ca(), test_redis_basic(), test_redis_with_database(), test_redis_with_password(), test_sqlite_file(), test_sqlite_memory(), test_sqlite_memory_overrides_file(), and test_sqlite_no_database().
| #define TEST_END | ( | ) |
Definition at line 50 of file test_connection_string_builder.cpp.
Referenced by test_builder_chaining(), test_builder_copy(), test_builder_reset(), test_builder_reuse(), test_mongodb_basic(), test_mongodb_default_host(), test_mongodb_ssl(), test_mongodb_with_auth(), test_postgres_app_name(), test_postgres_basic(), test_postgres_custom_option(), test_postgres_empty(), test_postgres_ssl(), test_postgres_timeout(), test_postgres_verify_ca(), test_redis_basic(), test_redis_with_database(), test_redis_with_password(), test_sqlite_file(), test_sqlite_memory(), test_sqlite_memory_overrides_file(), and test_sqlite_no_database().
| #define TEST_START | ( | name | ) |
Definition at line 22 of file test_connection_string_builder.cpp.
Referenced by test_builder_chaining(), test_builder_copy(), test_builder_reset(), test_builder_reuse(), test_mongodb_basic(), test_mongodb_default_host(), test_mongodb_ssl(), test_mongodb_with_auth(), test_postgres_app_name(), test_postgres_basic(), test_postgres_custom_option(), test_postgres_empty(), test_postgres_ssl(), test_postgres_timeout(), test_postgres_verify_ca(), test_redis_basic(), test_redis_with_database(), test_redis_with_password(), test_sqlite_file(), test_sqlite_memory(), test_sqlite_memory_overrides_file(), and test_sqlite_no_database().
| int main | ( | ) |
Definition at line 429 of file test_connection_string_builder.cpp.
References test_builder_chaining(), test_builder_copy(), test_builder_reset(), test_builder_reuse(), test_mongodb_basic(), test_mongodb_default_host(), test_mongodb_ssl(), test_mongodb_with_auth(), test_postgres_app_name(), test_postgres_basic(), test_postgres_custom_option(), test_postgres_empty(), test_postgres_ssl(), test_postgres_timeout(), test_postgres_verify_ca(), test_redis_basic(), test_redis_with_database(), test_redis_with_password(), test_sqlite_file(), test_sqlite_memory(), test_sqlite_memory_overrides_file(), test_sqlite_no_database(), tests_failed, and tests_passed.

| bool test_builder_chaining | ( | ) |
Definition at line 355 of file test_connection_string_builder.cpp.
References database::integrated::connection_string_builder::application_name(), ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::connect_timeout(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::option(), database::integrated::connection_string_builder::password(), database::integrated::connection_string_builder::port(), database::integrated::connection_string_builder::ssl_mode(), TEST_END, TEST_START, and database::integrated::connection_string_builder::user().
Referenced by main().


| bool test_builder_copy | ( | ) |
Definition at line 402 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::port(), TEST_END, and TEST_START.
Referenced by main().


| bool test_builder_reset | ( | ) |
Definition at line 334 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::port(), database::integrated::connection_string_builder::reset(), TEST_END, and TEST_START.
Referenced by main().


| bool test_builder_reuse | ( | ) |
Definition at line 380 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::password(), database::integrated::connection_string_builder::port(), database::integrated::connection_string_builder::reset(), TEST_END, TEST_START, and database::integrated::connection_string_builder::user().
Referenced by main().


| bool test_mongodb_basic | ( | ) |
Definition at line 226 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::port(), TEST_END, and TEST_START.
Referenced by main().


| bool test_mongodb_default_host | ( | ) |
Definition at line 257 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), TEST_END, and TEST_START.
Referenced by main().


| bool test_mongodb_ssl | ( | ) |
Definition at line 270 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::ssl_mode(), TEST_END, and TEST_START.
Referenced by main().


| bool test_mongodb_with_auth | ( | ) |
Definition at line 241 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::password(), TEST_END, TEST_START, and database::integrated::connection_string_builder::user().
Referenced by main().


| bool test_postgres_app_name | ( | ) |
Definition at line 127 of file test_connection_string_builder.cpp.
References database::integrated::connection_string_builder::application_name(), ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), TEST_END, and TEST_START.
Referenced by main().


| bool test_postgres_basic | ( | ) |
Definition at line 61 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::password(), database::integrated::connection_string_builder::port(), TEST_END, TEST_START, and database::integrated::connection_string_builder::user().
Referenced by main().


| bool test_postgres_custom_option | ( | ) |
Definition at line 141 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::option(), TEST_END, and TEST_START.
Referenced by main().


| bool test_postgres_empty | ( | ) |
Definition at line 155 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), TEST_END, and TEST_START.
Referenced by main().


| bool test_postgres_ssl | ( | ) |
Definition at line 84 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::ssl_mode(), TEST_END, and TEST_START.
Referenced by main().


| bool test_postgres_timeout | ( | ) |
Definition at line 113 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::connect_timeout(), database::integrated::connection_string_builder::host(), TEST_END, and TEST_START.
Referenced by main().


| bool test_postgres_verify_ca | ( | ) |
Definition at line 99 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::ssl_mode(), TEST_END, and TEST_START.
Referenced by main().


| bool test_redis_basic | ( | ) |
Definition at line 288 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::port(), TEST_END, and TEST_START.
Referenced by main().


| bool test_redis_with_database | ( | ) |
Definition at line 316 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::host(), TEST_END, and TEST_START.
Referenced by main().


| bool test_redis_with_password | ( | ) |
Definition at line 302 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::host(), database::integrated::connection_string_builder::password(), TEST_END, and TEST_START.
Referenced by main().


| bool test_sqlite_file | ( | ) |
Definition at line 171 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), TEST_END, and TEST_START.
Referenced by main().


| bool test_sqlite_memory | ( | ) |
Definition at line 184 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::in_memory(), TEST_END, and TEST_START.
Referenced by main().


| bool test_sqlite_memory_overrides_file | ( | ) |
Definition at line 208 of file test_connection_string_builder.cpp.
References ASSERT_EQ, ASSERT_TRUE, database::integrated::connection_string_builder::build(), database::integrated::connection_string_builder::database(), database::integrated::connection_string_builder::in_memory(), TEST_END, and TEST_START.
Referenced by main().


| bool test_sqlite_no_database | ( | ) |
Definition at line 197 of file test_connection_string_builder.cpp.
References ASSERT_TRUE, database::integrated::connection_string_builder::build(), TEST_END, and TEST_START.
Referenced by main().


|
static |
Definition at line 19 of file test_connection_string_builder.cpp.
Referenced by main().
|
static |
Definition at line 18 of file test_connection_string_builder.cpp.
Referenced by main().