File indexing completed on 2024-12-22 04:57:32

0001 /*
0002   This file is part of the kpimutils library.
0003 
0004   SPDX-FileCopyrightText: 2007 Till Adam <adam@kde.org>
0005 
0006   SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #pragma once
0010 
0011 #include <QObject>
0012 
0013 class QTemporaryDir;
0014 
0015 class MaildirTest : public QObject
0016 {
0017     Q_OBJECT
0018 private Q_SLOTS:
0019     void init();
0020     void testMaildirInstantiation();
0021     void testMaildirCreation();
0022     void testMaildirListing();
0023     void testMaildirAccess();
0024     void testMaildirReadHeaders();
0025     void testMaildirWrite();
0026     void testMaildirAppend();
0027     void testMaildirRemoveEntry();
0028     void testMaildirListSubfolders();
0029     void testMaildirCreateSubfolder();
0030     void testMaildirRemoveSubfolder();
0031     void testMaildirRename();
0032     void testMaildirMoveTo();
0033     void testMaildirFlagsReading();
0034     void testMaildirFlagsWriting_data();
0035     void testMaildirFlagsWriting();
0036     void cleanup();
0037 
0038 private:
0039     void fillDirectory(const QString &name, int limit);
0040     void fillNewDirectory();
0041     void fillCurrentDirectory();
0042     void createSubFolders();
0043     QTemporaryDir *m_temp = nullptr;
0044 };