Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test22.h
- Committer:
- ashleymills
- Date:
- 2012-09-13
- Revision:
- 34:d9e45aad85f2
- Parent:
- 33:16126e029d58
- Child:
- 37:847f5f86e9ff
File content as of revision 34:d9e45aad85f2:
#pragma once #include "VodafoneTestCase.h" static const char* gTest22Description = "Sending BAD USSD string \".2890\""; //const int gTest22Depends[] = {}; class Test22 : public VodafoneTestCase { public: Test22(VodafoneUSBModem *m) : VodafoneTestCase(m) { _description = gTest22Description; _testCaseNumber = 22; } virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } virtual bool execute() { 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); } private: char *_ussdResponse; };