DateTime support & some test tidying

This commit is contained in:
Aleksandar Fabijanic
2007-08-20 11:55:18 +00:00
parent 2dbfb583c9
commit 3b66a355c2
23 changed files with 266 additions and 164 deletions

View File

@@ -51,21 +51,22 @@
using namespace Poco::Data;
using Poco::Data::ODBC::Utility;
using Poco::Data::ODBC::ConnectionException;
using Poco::Data::ODBC::StatementException;
using Poco::Data::ODBC::StatementDiagnostics;
using ODBC::Utility;
using ODBC::ConnectionException;
using ODBC::StatementException;
using ODBC::StatementDiagnostics;
using Poco::format;
using Poco::Tuple;
using Poco::DateTime;
using Poco::NotFoundException;
const bool ODBCOracleTest::bindValues[8] = {true, true, true, false, false, true, false, false};
Poco::SharedPtr<Poco::Data::Session> ODBCOracleTest::_pSession = 0;
Poco::SharedPtr<SQLExecutor> ODBCOracleTest::_pExecutor = 0;
std::string ODBCOracleTest::_dbConnString;
Poco::Data::ODBC::Utility::DriverMap ODBCOracleTest::_drivers;
ODBCOracleTest::SessionPtr ODBCOracleTest::_pSession = 0;
ODBCOracleTest::ExecPtr ODBCOracleTest::_pExecutor = 0;
std::string ODBCOracleTest::_dbConnString;
ODBC::Utility::DriverMap ODBCOracleTest::_drivers;
const bool ODBCOracleTest::bindValues[8] =
{true, true, true, false, false, true, false, false};
ODBCOracleTest::ODBCOracleTest(const std::string& name):
@@ -79,10 +80,8 @@ ODBCOracleTest::~ODBCOracleTest()
}
void ODBCOracleTest::testBareboneODBC()
void ODBCOracleTest::testBarebone()
{
if (!_pSession) fail ("Test not available.");
std::string tableCreateString = "CREATE TABLE Test "
"(First VARCHAR(30),"
"Second VARCHAR(30),"
@@ -1297,6 +1296,15 @@ bool ODBCOracleTest::init(const std::string& driver, const std::string& dsn)
_pExecutor = new SQLExecutor(driver + " SQL Executor", _pSession);
// Workaround:
//
// Barebone ODBC test is called initially for Oracle only.
// The test framework does not exit cleanly if
// Oracle tests are enabled (i.e. Oracle driver is found)
// but no tests are executed.
// The exact reason for this behavior is unknown at this time.
testBarebone();
return true;
}