BA / Mbed OS BaBoRo1
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers wifi_tests.h Source File

wifi_tests.h

00001 #ifndef WIFI_TESTS_H
00002 #define WIFI_TESTS_H
00003 
00004 #include "WiFiInterface.h"
00005 
00006 /** Get WiFiInterface based on provided
00007  * app_json. */
00008 WiFiInterface *get_interface(void);
00009 
00010 /**
00011  * Get security protocol to be used
00012  */
00013 nsapi_security get_security(void);
00014 
00015 /*
00016  * Test cases
00017  */
00018 
00019 /** Test that constructor of the driver works. */
00020 void wifi_constructor(void);
00021 
00022 /** This test case is to test whether the driver accepts valid credentials and reject ones that are not valid. */
00023 void wifi_set_credential(void);
00024 
00025 /** Test validity of WiFiInterface::set_channel(). */
00026 void wifi_set_channel(void);
00027 
00028 /** Test WiFiInterface::get_rssi() API.
00029  * When connected, it should return valid RSSI value. When unconnected it should return 0. */
00030 void wifi_get_rssi(void);
00031 
00032 /** Test WiFiInterface::connect(ssid, pass, security, channel) with NULL parameters */
00033 void wifi_connect_params_null(void);
00034 
00035 /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for unsecure network */
00036 void wifi_connect_params_valid_unsecure(void);
00037 
00038 /** Test WiFiInterface::connect(ssid, pass, security) with valid parameters for secure network */
00039 void wifi_connect_params_valid_secure(void);
00040 
00041 /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using channel specified. */
00042 void wifi_connect_params_channel(void);
00043 
00044 /** Test WiFiInterface::connect(ssid, pass, security, channel) with valid parameters for secure network using wrong channel number. */
00045 void wifi_connect_params_channel_fail(void);
00046 
00047 /** Test WiFiInterface::connect() without parameters. Use set_credentials() for setting parameters. */
00048 void wifi_connect(void);
00049 
00050 /** Test WiFiInterface::connect() without parameters. Don't set parameters with set_credentials() */
00051 void wifi_connect_nocredentials(void);
00052 
00053 /** Test WiFiInterface::connect() without parameters. Use secure settings for set_credentials. */
00054 void wifi_connect_secure(void);
00055 
00056 /** Test WiFiInterface::connect() failing with wrong password. */
00057 void wifi_connect_secure_fail(void);
00058 
00059 /** Test WiFiInterface::connect() - disconnect() repeatition works. */
00060 void wifi_connect_disconnect_repeat(void);
00061 
00062 /** Call WiFiInterface::scan() with null parameters to get number of networks available. */
00063 void wifi_scan_null(void);
00064 
00065 /** Call WiFiInterface::scan() with valid accesspoint list allocated */
00066 void wifi_scan(void);
00067 
00068 #endif //WIFI_TESTS_H