Skip to content
FTPManagerTest.h 922 B
Newer Older
DonLakeFlyer's avatar
DonLakeFlyer committed
/****************************************************************************
 *
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#pragma once

#include "UnitTest.h"

class FTPManagerTest : public UnitTest
{
    Q_OBJECT

private slots:
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    void _performSizeBasedTestCases (void);
    void _performTestCases          (void);
    void _testLostPackets           (void);
DonLakeFlyer's avatar
DonLakeFlyer committed

private:
    typedef struct {
        const char* file;
    } TestCase_t;

DonLakeFlyer's avatar
 
DonLakeFlyer committed
    void _testCaseWorker            (const TestCase_t& testCase);
    void _sizeTestCaseWorker        (int fileSize);
    void _verifyFileSizeAndDelete   (const QString& filename, int expectedSize);
DonLakeFlyer's avatar
DonLakeFlyer committed

    static const TestCase_t _rgTestCases[];
};