File indexing completed on 2024-06-16 05:01:55
0001 /* Copyright (C) 2014 Stephan Platz <trojita@paalsteek.de> 0002 Copyright (C) 2014 Jan Kundrát <jkt@kde.org> 0003 0004 This file is part of the Trojita Qt IMAP e-mail client, 0005 http://trojita.flaska.net/ 0006 0007 This program is free software; you can redistribute it and/or 0008 modify it under the terms of the GNU General Public License as 0009 published by the Free Software Foundation; either version 2 of 0010 the License or (at your option) version 3 or any later version 0011 accepted by the membership of KDE e.V. (or its successor approved 0012 by the membership of KDE e.V.), which shall act as a proxy 0013 defined in Section 14 of version 3 of the license. 0014 0015 This program is distributed in the hope that it will be useful, 0016 but WITHOUT ANY WARRANTY; without even the implied warranty of 0017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0018 GNU General Public License for more details. 0019 0020 You should have received a copy of the GNU General Public License 0021 along with this program. If not, see <http://www.gnu.org/licenses/>. 0022 */ 0023 #ifndef TEST_IMAP_MSGPARTNETACCESSMANAGER 0024 #define TEST_IMAP_MSGPARTNETACCESSMANAGER 0025 0026 #include "Imap/Model/DummyNetworkWatcher.h" 0027 #include "Imap/Network/MsgPartNetAccessManager.h" 0028 #include "Utils/LibMailboxSync.h" 0029 #include <QtCore/QObject> 0030 0031 /** @short Unit tests for Imap::Network::MsgPartNetAccessManager and friends */ 0032 class ImapMsgPartNetAccessManagerTest : public LibMailboxSync 0033 { 0034 Q_OBJECT 0035 private Q_SLOTS: 0036 void init(); 0037 void cleanup(); 0038 void testMessageParts(); 0039 void testMessageParts_data(); 0040 void testFetchResultOfflineSingle(); 0041 0042 private: 0043 Imap::Mailbox::DummyNetworkWatcher *networkPolicy; 0044 Imap::Network::MsgPartNetAccessManager *netAccessManager; 0045 QPersistentModelIndex msg1, msg2; 0046 }; 0047 0048 #endif /*TEST_IMAP_MSGPARTNETACCESSMANAGER*/