diff options
author | Roland Reichwein <mail@reichwein.it> | 2023-01-02 19:59:41 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2023-01-02 19:59:41 +0100 |
commit | 992a1b3d2653ed527c2a301f80140bc35d84e832 (patch) | |
tree | 73981b8a28a0368f2b74b0369b1ecf649c908f77 /tests/test-whiteboard.cpp | |
parent | 20ceb53ec1c1bc18face8e831292dfe81fed3817 (diff) |
Switch from ImageMagick to GraphicsMagick for deterministic data; added tests
Diffstat (limited to 'tests/test-whiteboard.cpp')
-rw-r--r-- | tests/test-whiteboard.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/test-whiteboard.cpp b/tests/test-whiteboard.cpp new file mode 100644 index 0000000..6fe476d --- /dev/null +++ b/tests/test-whiteboard.cpp @@ -0,0 +1,57 @@ +#include <gtest/gtest.h> + +#include <filesystem> +#include <memory> +#include <string> +#include <system_error> + +#include "libreichwein/file.h" + +#include "config.h" +#include "storage.h" +#include "whiteboard.h" + +namespace fs = std::filesystem; + +namespace { + const std::string testConfigFilename{"./test.conf"}; + const std::string testDbFilename{"./whiteboard.db3"}; +} + +class WhiteboardTest: public ::testing::Test +{ +protected: + WhiteboardTest(){ + } + + ~WhiteboardTest() override{ + } + + void SetUp() override + { + File::setFile(testConfigFilename, R"CONFIG( +<config> + <datapath>.</datapath> + <maxage>2592000</maxage> +</config> +)CONFIG"); + std::error_code ec; + fs::remove(testDbFilename, ec); + + m_config = std::make_shared<Config>(testConfigFilename); + } + + void TearDown() override + { + std::error_code ec; + fs::remove(testDbFilename, ec); + fs::remove(testConfigFilename, ec); + } + + std::shared_ptr<Config> m_config; +}; + +TEST_F(WhiteboardTest, connection) +{ +} + |