Ashley Mills / Mbed 2 deprecated VodafoneTestSuite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Test07.h Source File

Test07.h

00001 #pragma once
00002 #include "VodafoneTestCase.h"
00003 extern const char* gTest07Description;
00004 
00005 class Test07 : public VodafoneTestCase {
00006    public: 
00007       Test07(VodafoneUSBModem *m) : VodafoneTestCase(m) {}
00008       
00009    private:
00010       virtual void setupTest() {
00011          _ussdResponse = (char*)malloc(16*sizeof(char));
00012       }
00013    
00014       virtual bool executeTest() {
00015          LOG(gTest07Description);
00016          
00017          if(_modem->sendUSSD(".2890",_ussdResponse,16)!=0) {
00018             LOG("Expecting \"Unknown command\". Received USSD response: \"%s\"",_ussdResponse);
00019             return true;
00020          }
00021          
00022          LOG("Expected USSD command to fail.");
00023          return false;   
00024       }
00025       
00026       virtual void endTest() {
00027          free(_ussdResponse);
00028       }
00029       
00030       char *_ussdResponse;
00031 };