MissionManagerTest.h 1.39 KB
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9
 *
 * 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);
34
    void _testErrorAckFailureStrings(void);
Don Gagne's avatar
Don Gagne committed
35

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

#endif