SourceForge.net Logo

test.h File Reference

#include <boost/test/floating_point_comparison.hpp>
#include <boost/test/included/unit_test.hpp>
#include "dbfacade.h"

Include dependency graph for test.h:

This graph shows which files directly or indirectly include this file:

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 Documentation

#define BOOST_TEST_MODULE   "DB_Facade"

The testing framework expects to find a database schema that looks like this:

  • table units
    • int id (not null, auto increment, primary key)
    • string name (not null, unique, length >= 50)
      idname
      1first unit
      2second unit
      3third unit
  • table groups
    • int id (not null, auto increment, primary key)
    • string name (not null, unique, length >= 50)
      idname
      1first group
      2second group
      3third group
  • table units_in_groups
    • int unit_id (foreign key to units.id)
    • int group_id (foreign key to groups.id)
    • the combination of unit_id and group_id is unique
      unit_idgroup_id
      11
      21
      22
      31
      32
      33
  • table misc_data
    • int id (not null, auto increment, primary key)
    • bool misc_boolean
    • double misc_double
    • int misc_int
    • string misc_string (length >= 15)
      idmisc_booleanmisc_doublemisc_int misc_string
      1<null> 3.1442"hello world"
      2true <null> 0<empty string>
      3false 42.0<null>"123"
      4true 0.027<null>

#define EPSILON   1E-7


Function Documentation

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.

Here is the caller graph for this function:

void prepareDatabase ( DatabasePtr &  db  ) 

Must be implemented by plugin developer.

Here is the caller graph for this function:


Generated on Mon Mar 16 20:04:31 2009 for libdbfacade.so by  doxygen 1.5.5