view ui/tests/downloadertest.h @ 60:6acb1dae6185

Use strn functions and improve error handling. Even if we know the strings are NULL terminated we use length terminated string functions after a first strlen this makes it easier to assert that at one point we know the string is terminated and afterwards use the length of that.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 18 Mar 2014 11:28:02 +0000
parents 64200b011dfd
children f5fa39347366
line wrap: on
line source
#ifndef DOWNLOADERTEST_H
#define DOWNLOADERTEST_H

#include <QObject>
#include <QtTest/QtTest>
#include <QProcess>
#include <QTemporaryDir>
#include <QSignalSpy>
#include "downloader.h"

class DownloaderTest: public QObject
{
    Q_OBJECT

    void startServer(QString additionalOptions = QString());

private:
    QProcess serverProc;
    QTemporaryDir serverConfigDir;

public Q_SLOTS:
    void downloaderError(const QString &message, SSLConnection::ErrorCode error);

private Q_SLOTS:
    void initTestCase();
    void cleanupTestCase();
    void testNewList();
    void testNoConnection();
    void testOtherCertificate();
    void testNewSoftware();
};
#endif

http://wald.intevation.org/projects/trustbridge/