blob: 80c10e1a268793a19214a582ce7d8486b6adff1c [file] [log] [blame]
Alexander Afanasyevb0c78ea2014-04-15 18:12:04 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Regents of the University of California.
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef REPO_TESTS_SQLITE_FIXTURE_HPP
8#define REPO_TESTS_SQLITE_FIXTURE_HPP
9
10#include "../storage/sqlite/sqlite-handle.hpp"
11
12#include <boost/filesystem.hpp>
13#include <boost/test/unit_test.hpp>
14
15namespace repo {
16namespace tests {
17
18class SqliteFixture
19{
20public:
21 SqliteFixture()
22 {
Alexander Afanasyevb0c78ea2014-04-15 18:12:04 -070023 handle = new SqliteHandle("unittestdb");
24 }
25
26 ~SqliteFixture()
27 {
28 delete handle;
29 boost::filesystem::remove_all(boost::filesystem::path("unittestdb"));
30 }
31
32public:
33 SqliteHandle* handle;
34};
35
36} // namespace tests
37} // namespace repo
38
39#endif // REPO_TESTS_SQLITE_FIXTURE_HPP