Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Tests/Test23.cpp
- Committer:
- ashleymills
- Date:
- 2012-09-17
- Revision:
- 44:6d0ac4747f5b
- Parent:
- 40:32b0558320ea
- Child:
- 60:7efce4a3c26f
File content as of revision 44:6d0ac4747f5b:
#pragma once #include "Test23.h" const char gTest23USSDMessage[161] = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; Test23::Test23(VodafoneUSBModem *m) : VodafoneTestCase(m) { //_description = gTest23Description; _testCaseNumber = 23; } // virtual void Test23::setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); } // virtual bool Test23::executeTest() { LOG(gTest23Description); if(_modem->sendUSSD(gTest23USSDMessage,_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 Test23::endTest() { free(_ussdResponse); }