aheinecke@404: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
aheinecke@404:  * Software engineering by Intevation GmbH
aheinecke@404:  *
aheinecke@404:  * This file is Free Software under the GNU GPL (v>=2)
aheinecke@404:  * and comes with ABSOLUTELY NO WARRANTY!
aheinecke@404:  * See LICENSE.txt for details.
aheinecke@404:  */
aheinecke@100: #ifndef CINSTPROCESSTEST_H
aheinecke@100: #define CINSTPROCESSTEST_H
aheinecke@100: 
aheinecke@100: /* @file Tests for the cinst process
aheinecke@100:  * @brief Tests for the cinst process as well as the UI side
aheinecke@100:  */
aheinecke@100: 
aheinecke@100: #include <QObject>
aheinecke@294: #include <QStringList>
aheinecke@100: #include <QProcess>
aheinecke@294: #include <QTemporaryFile>
andre@306: #include <QTemporaryDir>
rrenkert@141: #include <QTest>
aheinecke@100: #include "certificatelist.h"
aheinecke@100: 
aheinecke@100: class CinstProcessTest: public QObject
aheinecke@100: {
aheinecke@100:     Q_OBJECT
aheinecke@100: 
aheinecke@100: private:
aheinecke@294:     QProcess* startCinstProcess(const QStringList& args = QStringList());
aheinecke@294:     QTemporaryFile validListFile;
aheinecke@294:     QTemporaryFile otherListFile;
aheinecke@294:     QTemporaryFile invalidListFile;
andre@306:     QTemporaryDir fakeHome;
aheinecke@100:     CertificateList validList;
aheinecke@100:     CertificateList otherList;
aheinecke@100:     CertificateList invalidList;
aheinecke@100: 
aheinecke@100: private Q_SLOTS:
aheinecke@100:     void initTestCase();
aheinecke@100:     void testValidInput();
aheinecke@100:     void testInvalidInstruction();
aheinecke@100:     void testNoInput();
aheinecke@100:     void testNoList();
aheinecke@100:     void testGarbageInput();
aheinecke@100:     void testNoInstructions();
aheinecke@151:     void testUninstall();
aheinecke@100: };
aheinecke@100: #endif
aheinecke@100: 
aheinecke@100: