1 #ifndef DATA_BASE_SESSION_TEST
2 #define DATA_BASE_SESSION_TEST
4 #include <gtest/gtest.h>
6 #include <Poco/SharedPtr.h>
8 #include <Poco/Tuple.h>
9 #include <Poco/Data/MySQL/MySQLException.h>
10 #include <Poco/Data/Session.h>
11 #include <Application.h>
14 using namespace Poco::Data;
21 typedef Poco::Tuple<int,std::string>
person;
26 Poco::SharedPtr<HCE::database::DBSession>
_pSession;
28 virtual void setConnection (
const std::string&
key,
const std::string& parameters);
29 virtual void closeConnection ();
30 virtual bool isConnected () ;
32 virtual void countDataInDataBase (
int& count);
34 virtual void insertObjectInDataBase();
35 virtual void selectObjectFromDataBase ();
37 virtual void insertTupleInDataBase ();
38 virtual void selectAllTuplesDataFromDataBase ();
39 virtual void selectTupleDataFromDataBase ();
40 virtual void selectOneFieldFormDataBaseInTuple ();
42 virtual void createDataBase ();
43 virtual void dropDataBase ();
44 virtual void clearDataBase ();
46 void clearVector () throw();
48 virtual
void TearDown ();