|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Builder for common mock configurations. More...
#include <mock_database.h>

Public Member Functions | |
| mock_database_builder () | |
| mock_database_builder & | with_type (database_types type) |
| mock_database_builder & | with_default_result (const core::database_result &result) |
| mock_database_builder & | that_fails_on_connect () |
| mock_database | build () |
Static Public Member Functions | |
| static mock_database | empty_database () |
| static mock_database | with_data (const std::string &table_name, const core::database_result &data) |
| static mock_database | failing_database (const std::string &error="Mock database error") |
Private Attributes | |
| std::unique_ptr< mock_database > | mock_ |
Builder for common mock configurations.
Definition at line 120 of file mock_database.h.
| database::testing::mock_database_builder::mock_database_builder | ( | ) |
Definition at line 267 of file mock_database.cpp.
| mock_database database::testing::mock_database_builder::build | ( | ) |
Definition at line 303 of file mock_database.cpp.
References mock_.
|
static |
Definition at line 272 of file mock_database.cpp.
|
static |
Definition at line 282 of file mock_database.cpp.
References database::testing::mock_database::expect_any(), and database::testing::expectation_builder::will_fail().

| mock_database_builder & database::testing::mock_database_builder::that_fails_on_connect | ( | ) |
Definition at line 298 of file mock_database.cpp.
References mock_.
|
static |
Definition at line 276 of file mock_database.cpp.
References database::testing::mock_database::expect_pattern(), and database::testing::expectation_builder::will_return().

| mock_database_builder & database::testing::mock_database_builder::with_default_result | ( | const core::database_result & | result | ) |
Definition at line 293 of file mock_database.cpp.
References mock_.
| mock_database_builder & database::testing::mock_database_builder::with_type | ( | database_types | type | ) |
Definition at line 288 of file mock_database.cpp.
References mock_.
|
private |
Definition at line 137 of file mock_database.h.
Referenced by build(), that_fails_on_connect(), with_default_result(), and with_type().