| 1 | // |
|---|---|
| 2 | // DirectoryIteratorsTest.h |
| 3 | // |
| 4 | // Definition of the DirectoryIteratorsTest class. |
| 5 | // |
| 6 | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. |
| 7 | // and Contributors. |
| 8 | // |
| 9 | // SPDX-License-Identifier: BSL-1.0 |
| 10 | // |
| 11 | |
| 12 | |
| 13 | #ifndef DirectoryIteratorsTest_INCLUDED |
| 14 | #define DirectoryIteratorsTest_INCLUDED |
| 15 | |
| 16 | |
| 17 | #include "Poco/Foundation.h" |
| 18 | #include "Poco/Path.h" |
| 19 | #include "Poco/CppUnit/TestCase.h" |
| 20 | |
| 21 | |
| 22 | class DirectoryIteratorsTest: public CppUnit::TestCase |
| 23 | { |
| 24 | public: |
| 25 | DirectoryIteratorsTest(const std::string& name); |
| 26 | ~DirectoryIteratorsTest(); |
| 27 | |
| 28 | void testDirectoryIterator(); |
| 29 | void testSortedDirectoryIterator(); |
| 30 | void testSimpleRecursiveDirectoryIterator(); |
| 31 | void testSimpleRecursiveDirectoryIteratorOnError(); |
| 32 | void testSiblingsFirstRecursiveDirectoryIterator(); |
| 33 | void testSiblingsFirstRecursiveDirectoryIteratorOnError(); |
| 34 | void setUp(); |
| 35 | void tearDown(); |
| 36 | |
| 37 | static CppUnit::Test* suite(); |
| 38 | |
| 39 | protected: |
| 40 | Poco::Path path() const; |
| 41 | void createSubdir(Poco::Path& p); |
| 42 | void onError(const void* pSender, const std::string& path); |
| 43 | std::string _onErrorPath; |
| 44 | |
| 45 | private: |
| 46 | }; |
| 47 | |
| 48 | |
| 49 | #endif // DirectoryIteratorsTest_INCLUDED |
| 50 |