RAII wrapper for temporary test directory.
More...
#include <test_fixtures.h>
|
| std::filesystem::path | path_ |
| |
RAII wrapper for temporary test directory.
Definition at line 775 of file test_fixtures.h.
◆ test_directory() [1/3]
| kcenon::pacs::integration_test::test_directory::test_directory |
( |
const std::string & | prefix = "pacs_test_" | ) |
|
|
inlineexplicit |
Definition at line 777 of file test_fixtures.h.
777 {
778 auto temp_base = std::filesystem::temp_directory_path();
779 path_ = temp_base / (prefix + std::to_string(
780 std::chrono::system_clock::now().time_since_epoch().count()));
781 std::filesystem::create_directories(
path_);
782 }
std::filesystem::path path_
References path_.
◆ ~test_directory()
| kcenon::pacs::integration_test::test_directory::~test_directory |
( |
| ) |
|
|
inline |
Definition at line 784 of file test_fixtures.h.
784 {
785 if (std::filesystem::exists(
path_)) {
786 std::filesystem::remove_all(
path_);
787 }
788 }
References path_.
◆ test_directory() [2/3]
| kcenon::pacs::integration_test::test_directory::test_directory |
( |
const test_directory & | | ) |
|
|
delete |
◆ test_directory() [3/3]
| kcenon::pacs::integration_test::test_directory::test_directory |
( |
test_directory && | | ) |
|
|
delete |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ path()
| const std::filesystem::path & kcenon::pacs::integration_test::test_directory::path |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ string()
| std::string kcenon::pacs::integration_test::test_directory::string |
( |
| ) |
const |
|
inlinenodiscard |
◆ path_
| std::filesystem::path kcenon::pacs::integration_test::test_directory::path_ |
|
private |
The documentation for this class was generated from the following file: