Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Wed Jan 29 16:34:38 2014 +0000
Revision:
74:e52ac9624f7f
Parent:
73:effa8fcd45fc
Updated dependencies to latest versions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ashleymills 66:6b00a764e549 1 #pragma once
ashleymills 66:6b00a764e549 2 #include "VodafoneTestCase.h"
ashleymills 66:6b00a764e549 3 extern const char* gTest07Description;
ashleymills 66:6b00a764e549 4
ashleymills 66:6b00a764e549 5 class Test07 : public VodafoneTestCase {
ashleymills 66:6b00a764e549 6 public:
ashleymills 66:6b00a764e549 7 Test07(VodafoneUSBModem *m) : VodafoneTestCase(m) {}
ashleymills 66:6b00a764e549 8
ashleymills 66:6b00a764e549 9 private:
ashleymills 66:6b00a764e549 10 virtual void setupTest() {
ashleymills 66:6b00a764e549 11 _ussdResponse = (char*)malloc(16*sizeof(char));
ashleymills 66:6b00a764e549 12 }
ashleymills 66:6b00a764e549 13
ashleymills 66:6b00a764e549 14 virtual bool executeTest() {
ashleymills 66:6b00a764e549 15 LOG(gTest07Description);
ashleymills 66:6b00a764e549 16
ashleymills 73:effa8fcd45fc 17 if(_modem->sendUSSD(".2890",_ussdResponse,16)!=0) {
ashleymills 73:effa8fcd45fc 18 LOG("Expecting \"Unknown command\". Received USSD response: \"%s\"",_ussdResponse);
ashleymills 73:effa8fcd45fc 19 return true;
ashleymills 73:effa8fcd45fc 20 }
ashleymills 66:6b00a764e549 21
ashleymills 73:effa8fcd45fc 22 LOG("Expected USSD command to fail.");
ashleymills 73:effa8fcd45fc 23 return false;
ashleymills 66:6b00a764e549 24 }
ashleymills 66:6b00a764e549 25
ashleymills 66:6b00a764e549 26 virtual void endTest() {
ashleymills 66:6b00a764e549 27 free(_ussdResponse);
ashleymills 66:6b00a764e549 28 }
ashleymills 66:6b00a764e549 29
ashleymills 66:6b00a764e549 30 char *_ussdResponse;
ashleymills 66:6b00a764e549 31 };