|
Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
|
Fluent builder for expectations. More...
#include <mock_expectations.h>

Public Member Functions | |
| expectation_builder (mock_database *db, expectation exp) | |
| expectation_builder & | will_return (const core::database_result &result) |
| expectation_builder & | will_return_rows (uint64_t count) |
| expectation_builder & | will_fail (const std::string &error_message) |
| expectation_builder & | will_succeed () |
| expectation_builder & | times (int count) |
| expectation_builder & | once () |
| expectation_builder & | any_times () |
Private Attributes | |
| mock_database * | db_ |
| expectation | exp_ |
Fluent builder for expectations.
Definition at line 89 of file mock_expectations.h.
| database::testing::expectation_builder::expectation_builder | ( | mock_database * | db, |
| expectation | exp ) |
Definition at line 136 of file mock_expectations.cpp.
| expectation_builder & database::testing::expectation_builder::any_times | ( | ) |
Definition at line 175 of file mock_expectations.cpp.
References database::testing::expectation::at_least(), and exp_.

| expectation_builder & database::testing::expectation_builder::once | ( | ) |
Definition at line 170 of file mock_expectations.cpp.
References exp_, and database::testing::expectation::once().

| expectation_builder & database::testing::expectation_builder::times | ( | int | count | ) |
Definition at line 165 of file mock_expectations.cpp.
References exp_, and database::testing::expectation::times().

| expectation_builder & database::testing::expectation_builder::will_fail | ( | const std::string & | error_message | ) |
Definition at line 153 of file mock_expectations.cpp.
References db_, exp_, database::testing::mock_database::expectations_, and database::testing::expectation::throwing().
Referenced by database::testing::mock_database_builder::failing_database().


| expectation_builder & database::testing::expectation_builder::will_return | ( | const core::database_result & | result | ) |
Definition at line 141 of file mock_expectations.cpp.
References db_, exp_, database::testing::mock_database::expectations_, and database::testing::expectation::returning().
Referenced by database::testing::mock_database_builder::with_data().


| expectation_builder & database::testing::expectation_builder::will_return_rows | ( | uint64_t | count | ) |
Definition at line 147 of file mock_expectations.cpp.
References db_, exp_, database::testing::mock_database::expectations_, and database::testing::expectation::returning_rows_affected().

| expectation_builder & database::testing::expectation_builder::will_succeed | ( | ) |
Definition at line 159 of file mock_expectations.cpp.
References db_, exp_, database::testing::mock_database::expectations_, and database::testing::expectation::returning_execute_result().

|
private |
Definition at line 105 of file mock_expectations.h.
Referenced by will_fail(), will_return(), will_return_rows(), and will_succeed().
|
private |
Definition at line 106 of file mock_expectations.h.
Referenced by any_times(), once(), times(), will_fail(), will_return(), will_return_rows(), and will_succeed().