| 1 | // |
|---|---|
| 2 | // SQLTest.h |
| 3 | // |
| 4 | // Definition of the SQLTest class. |
| 5 | // |
| 6 | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. |
| 7 | // and Contributors. |
| 8 | // |
| 9 | // SPDX-License-Identifier: BSL-1.0 |
| 10 | // |
| 11 | |
| 12 | |
| 13 | #ifndef SQLTest_INCLUDED |
| 14 | #define SQLTest_INCLUDED |
| 15 | |
| 16 | |
| 17 | #include "Poco/SQL/SQL.h" |
| 18 | #include "Poco/BinaryReader.h" |
| 19 | #include "Poco/BinaryWriter.h" |
| 20 | #include "Poco/SQL/Row.h" |
| 21 | #include "Poco/CppUnit/TestCase.h" |
| 22 | |
| 23 | |
| 24 | class SQLTest: public CppUnit::TestCase |
| 25 | { |
| 26 | public: |
| 27 | SQLTest(const std::string& name); |
| 28 | ~SQLTest(); |
| 29 | |
| 30 | void testSession(); |
| 31 | void testStatementFormatting(); |
| 32 | void testFeatures(); |
| 33 | void testProperties(); |
| 34 | void testLOB(); |
| 35 | void testCLOB(); |
| 36 | void testCLOBStreams(); |
| 37 | void testColumnVector(); |
| 38 | void testColumnVectorBool(); |
| 39 | void testColumnDeque(); |
| 40 | void testColumnList(); |
| 41 | void testRow(); |
| 42 | void testRowSort(); |
| 43 | void testSimpleRowFormatter(); |
| 44 | void testJSONRowFormatter(); |
| 45 | void testDateAndTime(); |
| 46 | void testExternalBindingAndExtraction(); |
| 47 | |
| 48 | void testStdTuple(); |
| 49 | |
| 50 | void setUp(); |
| 51 | void tearDown(); |
| 52 | |
| 53 | static CppUnit::Test* suite(); |
| 54 | |
| 55 | private: |
| 56 | void testRowStrictWeak(const Poco::SQL::Row& row1, |
| 57 | const Poco::SQL::Row& row2, |
| 58 | const Poco::SQL::Row& row3); |
| 59 | /// Strict weak ordering requirement for sorted containers |
| 60 | /// as described in Josuttis "The Standard C++ Library" |
| 61 | /// chapter 6.5. pg. 176. |
| 62 | /// For this to pass, the following condition must be satisifed: |
| 63 | /// row1 < row2 < row3 |
| 64 | |
| 65 | void writeToCLOB(Poco::BinaryWriter& writer); |
| 66 | void readFromCLOB(Poco::BinaryReader& reader); |
| 67 | }; |
| 68 | |
| 69 | |
| 70 | #endif // SQLTest_INCLUDED |
| 71 |