MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
mxl::tests::mxlDomainFixture Class Reference

#include <Utils.hpp>

Public Member Functions

 mxlDomainFixture ()
 Create the fixture. Will delete the domain if it exists and create a new one.
 ~mxlDomainFixture ()
 Delete the domain folder.

Protected Member Functions

bool flowDirectoryExists (std::string const &id) const

Protected Attributes

std::filesystem::path domain
 The path to the domain.

Private Member Functions

void removeDomain ()
 Remove the domain folder if it exists.

Detailed Description

Definition at line 37 of file Utils.hpp.

Constructor & Destructor Documentation

◆ mxlDomainFixture()

mxl::tests::mxlDomainFixture::mxlDomainFixture ( )
inline

Create the fixture. Will delete the domain if it exists and create a new one.

Definition at line 41 of file Utils.hpp.

43 {
45 std::filesystem::create_directories(domain);
46 }
std::filesystem::path domain
The path to the domain.
Definition Utils.hpp:56
void removeDomain()
Remove the domain folder if it exists.
Definition Utils.hpp:66
std::filesystem::path getDomainPath()
Definition Utils.hpp:90

◆ ~mxlDomainFixture()

mxl::tests::mxlDomainFixture::~mxlDomainFixture ( )
inline

Delete the domain folder.

Definition at line 49 of file Utils.hpp.

50 {
52 }

Member Function Documentation

◆ flowDirectoryExists()

bool mxl::tests::mxlDomainFixture::flowDirectoryExists ( std::string const & id) const
inlinenodiscardprotected

Definition at line 59 of file Utils.hpp.

60 {
61 return std::filesystem::exists(lib::makeFlowDirectoryName(domain, id));
62 }
std::filesystem::path makeFlowDirectoryName(std::filesystem::path const &domain, std::string const &uuid)
Definition PathUtils.cpp:11

◆ removeDomain()

void mxl::tests::mxlDomainFixture::removeDomain ( )
inlineprivate

Remove the domain folder if it exists.

Definition at line 66 of file Utils.hpp.

67 {
68 if (std::filesystem::exists(domain))
69 {
70 std::filesystem::remove_all(domain);
71 }
72 }

Member Data Documentation

◆ domain

std::filesystem::path mxl::tests::mxlDomainFixture::domain
protected

The path to the domain.

Definition at line 56 of file Utils.hpp.


The documentation for this class was generated from the following file: