test_utils.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef TESTS_UTILS_TEST_UTILS_H
  2. #define TESTS_UTILS_TEST_UTILS_H
  3. #include <QtTest>
  4. #include <QJsonObject>
  5. namespace tests
  6. {
  7. class TestUtils : public QObject
  8. {
  9. Q_OBJECT
  10. public:
  11. explicit TestUtils(QObject *p_parent = nullptr);
  12. private slots:
  13. void initTestCase();
  14. // Define test cases here per slot.
  15. // Utils tests.
  16. void testParseAndReadJson_data();
  17. void testParseAndReadJson();
  18. // PathUtils Tests.
  19. void testParentDirPath_data();
  20. void testParentDirPath();
  21. void testCleanPath_data();
  22. void testCleanPath();
  23. void testAreSamePaths_data();
  24. void testAreSamePaths();
  25. void testPathContains_data();
  26. void testPathContains();
  27. void testConcatenateFilePath_data();
  28. void testConcatenateFilePath();
  29. // FileUtils Tests.
  30. void testRenameFile();
  31. void testIsText();
  32. private:
  33. QJsonObject m_obj;
  34. };
  35. } // ns tests
  36. #endif // TESTS_UTILS_TEST_UTILS_H