MissionManagerTest.h 1.28 KB
Newer Older
1 2 3 4 5 6 7 8 9
/****************************************************************************
 *
 *   (c) 2009-2016 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.
 *
 ****************************************************************************/

Don Gagne's avatar
Don Gagne committed
10 11 12 13 14 15 16 17

#ifndef MissionManagerTest_H
#define MissionManagerTest_H

#include "UnitTest.h"
#include "MockLink.h"
#include "MissionManager.h"
#include "MultiSignalSpy.h"
18
#include "MissionControllerManagerTest.h"
Don Gagne's avatar
Don Gagne committed
19

20 21
#include <QGeoCoordinate>

22
class MissionManagerTest : public MissionControllerManagerTest
Don Gagne's avatar
Don Gagne committed
23 24 25 26 27 28 29
{
    Q_OBJECT
    
public:
    MissionManagerTest(void);
    
private slots:
Don Gagne's avatar
Don Gagne committed
30
    void _testWriteFailureHandlingPX4(void);
31
    void _testWriteFailureHandlingAPM(void);
Don Gagne's avatar
Don Gagne committed
32
    void _testReadFailureHandlingPX4(void);
33
    void _testReadFailureHandlingAPM(void);
Don Gagne's avatar
Don Gagne committed
34

Don Gagne's avatar
Don Gagne committed
35
private:
36 37
    void _roundTripItems(MockLinkMissionItemHandler::FailureMode_t failureMode, bool shouldFail);
    void _writeItems(MockLinkMissionItemHandler::FailureMode_t failureMode, bool shouldFail);
Don Gagne's avatar
Don Gagne committed
38 39
    void _testWriteFailureHandlingWorker(void);
    void _testReadFailureHandlingWorker(void);
Don Gagne's avatar
Don Gagne committed
40
    
41 42
    static const TestCase_t _rgTestCases[];
    static const size_t     _cTestCases;
Don Gagne's avatar
Don Gagne committed
43 44 45
};

#endif