File indexing completed on 2025-03-09 04:10:04
0001 /* 0002 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef __KIS_LINKED_PATTERN_MANAGER_TEST_H 0008 #define __KIS_LINKED_PATTERN_MANAGER_TEST_H 0009 0010 #include <simpletest.h> 0011 0012 #include <kis_properties_configuration.h> 0013 0014 #include <KoPattern.h> 0015 0016 class KisLinkedPatternManagerTest : public QObject 0017 { 0018 Q_OBJECT 0019 private Q_SLOTS: 0020 void testRoundTrip(); 0021 0022 void init(); 0023 0024 void testLoadingNotOnServerValidName(); 0025 void testLoadingNotOnServerEmptyName(); 0026 void testLoadingNotOnServerPathName(); 0027 0028 void testLoadingOnServerValidName(); 0029 void testLoadingOnServerEmptyName(); 0030 void testLoadingOnServerPathName(); 0031 0032 void testLoadingOnServerValidNameMd5(); 0033 void testLoadingOnServerEmptyNameMd5(); 0034 void testLoadingOnServerPathNameMd5(); 0035 0036 private: 0037 0038 enum NameStatus { 0039 VALID, 0040 PATH, 0041 EMPTY 0042 }; 0043 void checkOneConfig(NameStatus nameStatus, bool hasMd5, QString expectedName, bool isOnServer); 0044 KisPropertiesConfigurationSP createXML(NameStatus nameStatus, bool hasMd5); 0045 KoPatternSP createPattern(); 0046 }; 0047 0048 #endif /* __KIS_LINKED_PATTERN_MANAGER_TEST_H */