Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Diff: Tests/Test22.h
- Revision:
- 66:6b00a764e549
- Parent:
- 65:ef3357b6ce97
- Child:
- 67:a61d60fa342c
--- a/Tests/Test22.h Tue Oct 30 15:51:53 2012 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -#pragma once -#include "VodafoneTestCase.h" -extern const char* gTest22Description; - -class Test22 : public VodafoneTestCase { - public: - Test22(VodafoneUSBModem *m) : VodafoneTestCase(m) {} - - private: - virtual void setupTest() { - _ussdResponse = (char*)malloc(16*sizeof(char)); - } - - virtual bool executeTest() { - LOG(gTest22Description); - - if(_modem->sendUSSD(".2890",_ussdResponse,16)!=0) { - LOG("Error sending USSD"); - return false; - } - - LOG("Expecting \"Unknown command\". Received USSD response: \"%s\"",_ussdResponse); - return (strcmp(_ussdResponse,"Unknown command")==0); - } - - virtual void endTest() { - free(_ussdResponse); - } - - char *_ussdResponse; -};