47 lines
985 B
C++
47 lines
985 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include <eedb/db/data/PgCategory.hpp>
|
|
|
|
#include <eedb/db/config.hpp>
|
|
#include <eedb/db/connection.hpp>
|
|
|
|
class PgCategoryTest : public testing::Test {
|
|
public:
|
|
static void SetUpTestCase() {
|
|
/*
|
|
* 1. Create test database
|
|
* 2. create config
|
|
* 3. Setup needed tables in database
|
|
* 4. Fill tables with data
|
|
*/
|
|
}
|
|
|
|
PgCategoryTest() {
|
|
/*
|
|
* 1. Start transaction
|
|
*/
|
|
db->native()->start_transaction();
|
|
}
|
|
|
|
~PgCategoryTest() {
|
|
/*
|
|
* 1. Revert Transaction
|
|
*/
|
|
db->native()->rollback_transaction(false);
|
|
}
|
|
|
|
static void TearDownTestCase() {
|
|
/*
|
|
* 1. Remove everything
|
|
*/
|
|
}
|
|
|
|
protected:
|
|
static std::shared_ptr< eedb::db::PgConfig > db_config;
|
|
std::unique_ptr< eedb::db::PgConnection > db;
|
|
|
|
std::unique_ptr< eedb::PgCategory > sut;
|
|
};
|
|
|
|
TEST_F(PgCategoryTest, rootCategoryHasNoParent) {}
|