![]() |
#include <boost/test/floating_point_comparison.hpp>#include <boost/test/included/unit_test.hpp>#include "dbfacade.h"


Go to the source code of this file.
Classes | |
| struct | Fixture |
Defines | |
| #define | BOOST_TEST_MODULE "DB_Facade" |
| #define | EPSILON 1E-7 |
Functions | |
| void | prepareDatabase (DatabasePtr &db) |
| void | deleteDatabase (DatabasePtr &db) |
| BOOST_FIXTURE_TEST_CASE (escape, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (ResultPtr_RowPtr, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (sqlSelect, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (execute, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (sqlInsert, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (sqlUpdate, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (getFirstBoolean, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (getFirstDouble, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (getFirstInt, Fixture) | |
| BOOST_FIXTURE_TEST_CASE (getFirstString, Fixture) | |
| #define BOOST_TEST_MODULE "DB_Facade" |
The testing framework expects to find a database schema that looks like this:
unitsint id (not null, auto increment, primary key)string name (not null, unique, length >= 50) | id | name |
| 1 | first unit |
| 2 | second unit |
| 3 | third unit |
groupsint id (not null, auto increment, primary key)string name (not null, unique, length >= 50) | id | name |
| 1 | first group |
| 2 | second group |
| 3 | third group |
units_in_groupsint unit_id (foreign key to units.id)int group_id (foreign key to groups.id)unit_id and group_id is unique | unit_id | group_id |
| 1 | 1 |
| 2 | 1 |
| 2 | 2 |
| 3 | 1 |
| 3 | 2 |
| 3 | 3 |
misc_dataint id (not null, auto increment, primary key)bool misc_booleandouble misc_doubleint misc_intstring misc_string (length >= 15) | id | misc_boolean | misc_double | misc_int | misc_string |
| 1 | <null> | 3.14 | 42 | "hello world" |
| 2 | true | <null> | 0 | <empty string> |
| 3 | false | 42.0 | <null> | "123" |
| 4 | true | 0.0 | 27 | <null> |
| #define EPSILON 1E-7 |
| BOOST_FIXTURE_TEST_CASE | ( | getFirstString | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | getFirstInt | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | getFirstDouble | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | getFirstBoolean | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | sqlUpdate | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | sqlInsert | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | execute | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | sqlSelect | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | ResultPtr_RowPtr | , | |
| Fixture | ||||
| ) |
| BOOST_FIXTURE_TEST_CASE | ( | escape | , | |
| Fixture | ||||
| ) |
| void deleteDatabase | ( | DatabasePtr & | db | ) |
Must be implemented by plugin developer.

| void prepareDatabase | ( | DatabasePtr & | db | ) |
Must be implemented by plugin developer.

1.5.5