Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
nherriot
Date:
Wed Sep 12 16:55:00 2012 +0000
Revision:
31:9231acdde9ff
Parent:
30:dd2beda340c6
Child:
33:16126e029d58
adding new sms test cases for send/receive irregular chars. changing auto run list, and adding descriptions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ashleymills 2:ea883307d02f 1 #pragma once
ashleymills 2:ea883307d02f 2 #include "VodafoneUSBModem.h"
ashleymills 2:ea883307d02f 3 #include "LogHeader.h"
nherriot 28:c630a04a7198 4
nherriot 28:c630a04a7198 5 const char myMessage[] = "myMessage is golden";
nherriot 31:9231acdde9ff 6 //const char testPhoneNumber[] = "+447717275049";
nherriot 28:c630a04a7198 7 const char testPhoneNumber[] = "+447785666088";
nherriot 28:c630a04a7198 8 const char testMessage[] = "this is a test message !";
nherriot 31:9231acdde9ff 9 const char alphabetNumbersMessage[] = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
nherriot 28:c630a04a7198 10 const char allCharsMessage[] = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()!£$%&*,.':;";
nherriot 31:9231acdde9ff 11 const char irregularMessage[] = "/:[]{}()!£$%&*,.';";
nherriot 28:c630a04a7198 12
nherriot 28:c630a04a7198 13
ashleymills 2:ea883307d02f 14 class VodafoneTestCase {
ashleymills 2:ea883307d02f 15 public:
nherriot 13:8b69853966f8 16 VodafoneTestCase(VodafoneUSBModem *m, int tcNumber) : _modem(m), _testCaseNumber(tcNumber) , _lastRunTime(0), _lastRunOutcome(false){
ashleymills 2:ea883307d02f 17 }
ashleymills 2:ea883307d02f 18
ashleymills 4:1f8e079924ba 19 bool run() {
ashleymills 8:6c30647f75d7 20 _lastRunTime = time(NULL);
ashleymills 4:1f8e079924ba 21 setupTest();
ashleymills 8:6c30647f75d7 22 _lastRunOutcome = runTest();
ashleymills 8:6c30647f75d7 23 endTest();
ashleymills 8:6c30647f75d7 24 return _lastRunOutcome;
ashleymills 4:1f8e079924ba 25 }
ashleymills 4:1f8e079924ba 26
ashleymills 4:1f8e079924ba 27 virtual void setupTest() {
ashleymills 4:1f8e079924ba 28 }
ashleymills 4:1f8e079924ba 29
ashleymills 4:1f8e079924ba 30 virtual bool runTest() {
ashleymills 4:1f8e079924ba 31 LOG("Base class runTest called!");
ashleymills 4:1f8e079924ba 32 return true;
ashleymills 4:1f8e079924ba 33 }
ashleymills 4:1f8e079924ba 34
ashleymills 8:6c30647f75d7 35 virtual void endTest() {
ashleymills 8:6c30647f75d7 36
ashleymills 4:1f8e079924ba 37 }
ashleymills 2:ea883307d02f 38
ashleymills 2:ea883307d02f 39 protected:
ashleymills 2:ea883307d02f 40 VodafoneUSBModem *_modem;
nherriot 13:8b69853966f8 41 const int _testCaseNumber;
ashleymills 27:0297dbc3252b 42 public:
ashleymills 3:28336c2e94e4 43 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 44 bool _lastRunOutcome;
nherriot 13:8b69853966f8 45
ashleymills 1:0d63e4db8503 46 };