diff options
-rw-r--r-- | netfs/unittests/testCore.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp index ba330cd..1fc1817 100644 --- a/netfs/unittests/testCore.cpp +++ b/netfs/unittests/testCore.cpp @@ -144,13 +144,22 @@ class Core { fuse_operations * fuse;; }; -BOOST_FIXTURE_TEST_SUITE( NetfsCore, Core ) +class GlobalSandBox { + public: + GlobalSandBox() + { + boost::filesystem::remove_all(TestExportRoot); + boost::filesystem::create_directories(TestExportRoot); + } + ~GlobalSandBox() + { + boost::filesystem::remove_all(TestExportRoot); + } +}; -BOOST_AUTO_TEST_CASE ( initializeSandbox ) -{ - boost::filesystem::remove_all(TestExportRoot); - boost::filesystem::create_directories(TestExportRoot); -} +BOOST_GLOBAL_FIXTURE(GlobalSandBox); + +BOOST_FIXTURE_TEST_SUITE( NetfsCore, Core ) BOOST_AUTO_TEST_CASE ( daemonInitialised ) { |