File: cryptocomposertest.h

package info (click to toggle)
messagelib 4%3A24.12.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,476 kB
  • sloc: cpp: 106,765; xml: 375; sh: 25; makefile: 15
file content (81 lines) | stat: -rw-r--r-- 1,983 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
  SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
  SPDX-FileCopyrightText: 2009 Leo Franchi <lfranchi@kde.org>

  SPDX-License-Identifier: LGPL-2.0-or-later
*/

#pragma once

#include <QObject>

namespace MessageComposer
{
class Composer;
}

class CryptoComposerTest : public QObject
{
    Q_OBJECT

public Q_SLOTS:
    void initTestCase();

private Q_SLOTS:
    // openpgp
    void testOpenPGPMime();
    void testOpenPGPMime_data();

    // the following will do for s-mime as well, as the same sign/enc jobs are used
    void testEncryptSameAttachments();
    void testEncryptSameAttachments_data();
    void testSignEncryptLateAttachments();
    void testSignEncryptLateAttachments_data();

    void testEditEncryptAttachments();
    void testEditEncryptAttachments_data();

    void testEditEncryptAndLateAttachments();
    void testEditEncryptAndLateAttachments_data();

    // test protected headers
    void testProtectedHeaders();
    void testProtectedHeaders_data();

    // secondary recipients
    void testBCCEncrypt();
    void testBCCEncrypt_data();

    // inline pgp
    void testOpenPGPInline_data();
    void testOpenPGPInline();

    // s-mime
    void testSMIME_data();
    void testSMIME();
    void testSMIMEOpaque_data();
    void testSMIMEOpaque();

    // contentTransferEncoding
    void testCTEquPr_data();
    void testCTEquPr();
    void testCTEbase64_data();
    void testCTEbase64();

    void testSetGnupgHome_data();
    void testSetGnupgHome();

    void testAutocryptHeaders_data();
    void testAutocryptHeaders();

    void testAutocryptGossip_data();
    void testAutocryptGossip();

    // TODO test the code for autodetecting the charset of a text attachment.
private:
    void fillComposerData(MessageComposer::Composer *composer, const QString &data);
    void fillComposerCryptoData(MessageComposer::Composer *composer);

    // convenience, shared code
    void runSMIMETest(bool sign, bool enc, bool opaque);
};