File indexing completed on 2024-12-22 04:12:01

0001 /*
0002  * SPDX-FileCopyrightText: 2018 boud <boud@valdyas.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef TESTRESOURCEMODEL_H
0007 #define TESTRESOURCEMODEL_H
0008 
0009 #include <QObject>
0010 #include <QtSql>
0011 
0012 #include "KisResourceTypes.h"
0013 
0014 class KisResourceLocator;
0015 class TestResourceModel : public QObject
0016 {
0017     Q_OBJECT
0018 private Q_SLOTS:
0019     void initTestCase();
0020     void testWithTagModelTester();
0021     void testRowCount();
0022     void testData();
0023     void testResourceForIndex();
0024     void testIndexFromResource();
0025     void testSetInactiveByIndex();
0026     void testImportResourceFile();
0027     void testAddResource();
0028     void testAddTemporaryResource();
0029     void testAddDuplicatedResource();
0030     void testResourceForId();
0031     void testResourceForName();
0032     void testResourceForFileName();
0033     void testResourceForMD5();
0034     void testRenameResource();
0035     void testUpdateResource();
0036     void testTwoExistingResourceModels();
0037     void cleanupTestCase();
0038 
0039 private:
0040 
0041     QString m_srcLocation;
0042     QString m_dstLocation;
0043 
0044     KisResourceLocator *m_locator;
0045     const QString m_resourceType = ResourceType::PaintOpPresets;
0046 
0047 };
0048 
0049 #endif