test/include/IntegrityTests.h
author Krista Bennett <krista@pep-project.org>
Fri, 18 May 2018 10:20:08 +0200
branchENGINE-434
changeset 2678 610a608c410d
child 2679 567462e5b11a
permissions -rw-r--r--
ENGINE-434: PGP/MIME behaviour in and tested. Time to fix the rest.
krista@2678
     1
// This file is under GNU General Public License 3.0
krista@2678
     2
// see LICENSE.txt
krista@2678
     3
krista@2678
     4
#ifndef INTEGRITY_H
krista@2678
     5
#define INTEGRITY_H
krista@2678
     6
krista@2678
     7
#include <string>
krista@2678
     8
#include "pEpEngine.h"
krista@2678
     9
#include "message_api.h"
krista@2678
    10
krista@2678
    11
#include "EngineTestIndividualSuite.h"
krista@2678
    12
krista@2678
    13
using namespace std;
krista@2678
    14
krista@2678
    15
class IntegrityTests : public EngineTestIndividualSuite {
krista@2678
    16
    public:
krista@2678
    17
        IntegrityTests(string test_suite, string test_home_dir);
krista@2678
    18
        
krista@2678
    19
    protected:
krista@2678
    20
        void setup();
krista@2678
    21
        void tear_down();
krista@2678
    22
            
krista@2678
    23
    private:
krista@2678
    24
        const char* recip_fpr;
krista@2678
    25
krista@2678
    26
        // used by each test
krista@2678
    27
        string message;
krista@2678
    28
        char* decrypted_msg;
krista@2678
    29
        PEP_STATUS decrypt_status;
krista@2678
    30
        PEP_rating rating;
krista@2678
    31
        PEP_decrypt_flags_t flags;
krista@2678
    32
        stringlist_t* keylist;
krista@2678
    33
        char* dummy_ignore;
krista@2678
    34
        
krista@2678
    35
        void check_unsigned_PGP_MIME();
krista@2678
    36
        void check_unsigned_PGP_MIME_attached_key();
krista@2678
    37
        void check_unsigned_PGP_MIME_w_render_flag();
krista@2678
    38
        void check_known_good_signed_PGP_MIME();
krista@2678
    39
        void check_known_good_signed_PGP_MIME_attached_key();
krista@2678
    40
        void check_unknown_signed_PGP_MIME_no_key();
krista@2678
    41
        void check_unknown_signed_PGP_MIME_attached_key();
krista@2678
    42
        void check_unsigned_PGP_MIME_corrupted();
krista@2678
    43
        void check_signed_PGP_MIME_corrupted();
krista@2678
    44
        void check_integrity();
krista@2678
    45
        
krista@2678
    46
krista@2678
    47
};
krista@2678
    48
krista@2678
    49
#endif