Subversion Repositories Projects

Rev

Rev 513 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
513 Brean 1
#ifndef HANDLER_TEST_H
2
#define HANDLER_TEST_H
3
 
4
#include <cppunit/TestFixture.h>
5
#include <cppunit/extensions/HelperMacros.h>
6
#include "../libMK/Handler.h"
7
#include "../libMK/Kopter.h"
8
#include "../libMK/Communication.h"
9
 
10
class HandlerTest : public CPPUNIT_NS :: TestFixture
11
{
12
    CPPUNIT_TEST_SUITE (HandlerTest);
13
    CPPUNIT_TEST (get_flightctrl_settings_test);
524 Brean 14
    CPPUNIT_TEST (set_flightctrl_settings_test);
15
    CPPUNIT_TEST (motor_test_test);
16
    CPPUNIT_TEST (reset_motor_test);
17
    CPPUNIT_TEST (read_motor_mixer_test);
18
    CPPUNIT_TEST (write_motor_mixer_test);
19
    CPPUNIT_TEST (get_motor_config_test);
20
 
21
    //NaviCtrl commands
22
    CPPUNIT_TEST (set_navictrl_debug_test);
23
    CPPUNIT_TEST (stop_navictrl_debug_test);
24
    CPPUNIT_TEST (send_waypoint_test);
25
    CPPUNIT_TEST (add_waypoint_test);
26
    CPPUNIT_TEST (delete_waypoints_test);
27
 
28
    //switch between MK modules/components
29
    CPPUNIT_TEST (switch_navictrl_test);
30
    CPPUNIT_TEST (switch_flightctrl_test);
31
    CPPUNIT_TEST (switch_mk3mag_test);
32
 
33
    //commands for MK3MAG
34
 
35
    //commands for all modules/components
36
    CPPUNIT_TEST (set_all_debug_test);
37
    CPPUNIT_TEST (stop_all_debug_test);
38
    CPPUNIT_TEST (get_analog_test);
39
    CPPUNIT_TEST (show_lcd_test);
40
    CPPUNIT_TEST (lcd_up_test);
41
    CPPUNIT_TEST (lcd_down_test);
42
    CPPUNIT_TEST (get_version_test);
43
    CPPUNIT_TEST (get_ppm_channels_test);
44
 
513 Brean 45
    CPPUNIT_TEST_SUITE_END ();
46
 
47
    public:
48
        void setUp (void);
49
        void tearDown (void);
50
 
51
    protected:
52
        void get_flightctrl_settings_test(void);
524 Brean 53
        void set_flightctrl_settings_test(void);
54
        void motor_test_test(void);
55
        void reset_motor_test(void);
56
        void read_motor_mixer_test(void);
57
        void write_motor_mixer_test(void);
58
        void get_motor_config_test(void);
513 Brean 59
 
524 Brean 60
        //NaviCtrl commands
61
        void set_navictrl_debug_test(void);
62
        void stop_navictrl_debug_test(void);
63
        void send_waypoint_test(void);
64
        void add_waypoint_test(void);
65
        void delete_waypoints_test(void);
66
 
67
        //switch between MK modules/components
68
        void switch_navictrl_test(void);
69
        void switch_flightctrl_test(void);
70
        void switch_mk3mag_test(void);
71
 
72
        //commands for MK3MAG
73
 
74
        //commands for all modules/components
75
        void set_all_debug_test(void);
76
        void stop_all_debug_test(void);
77
        void get_analog_test(void);
78
        void show_lcd_test(void);
79
        void lcd_up_test(void);
80
        void lcd_down_test(void);
81
        void get_version_test(void);
82
        void get_ppm_channels_test(void);
83
 
513 Brean 84
    private:
85
        KopterData data;
86
        Communication com;
87
        Handler * handler;
88
};
89
 
90
CPPUNIT_TEST_SUITE_REGISTRATION( HandlerTest );
91
 
92
#endif