Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
nherriot
Date:
Wed Sep 12 10:18:28 2012 +0000
Revision:
30:dd2beda340c6
Parent:
27:0297dbc3252b
Parent:
29:c0e6f198db84
Child:
31:9231acdde9ff
Child:
32:8ff0b67bb58c
merging working set with Ashley's new stuff

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 28:c630a04a7198 6 const char testPhoneNumber[] = "+447785666088";
nherriot 28:c630a04a7198 7 const char testMessage[] = "this is a test message !";
nherriot 28:c630a04a7198 8 const char allCharsMessage[] = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]{}()!£$%&*,.':;";
nherriot 29:c0e6f198db84 9 const char irregularMessage[] = "[]{}()!£$%&*,.':;";
nherriot 28:c630a04a7198 10 //const char testMessage[] = "this is a test message !�$%^&*()_+=[][{};:@#~,.<>/?\|";
nherriot 28:c630a04a7198 11
nherriot 28:c630a04a7198 12 //#define GSM03DOT38CHARSET "@�$�����������&#916;_&#934;&#915;&#923;&#937;&#928;&#936;&#931;&#920;&#926;���� !�#�%&�()*+,-./0123456789:;<=>?�ABCDEFGHIJKLMNOPQRSTUVWXYZ���ܧ�abcdefghijklmnopqrstuvwxyz�����";
nherriot 28:c630a04a7198 13
nherriot 28:c630a04a7198 14
ashleymills 2:ea883307d02f 15 class VodafoneTestCase {
ashleymills 2:ea883307d02f 16 public:
nherriot 13:8b69853966f8 17 VodafoneTestCase(VodafoneUSBModem *m, int tcNumber) : _modem(m), _testCaseNumber(tcNumber) , _lastRunTime(0), _lastRunOutcome(false){
ashleymills 2:ea883307d02f 18 }
ashleymills 2:ea883307d02f 19
ashleymills 4:1f8e079924ba 20 bool run() {
ashleymills 8:6c30647f75d7 21 _lastRunTime = time(NULL);
ashleymills 4:1f8e079924ba 22 setupTest();
ashleymills 8:6c30647f75d7 23 _lastRunOutcome = runTest();
ashleymills 8:6c30647f75d7 24 endTest();
ashleymills 8:6c30647f75d7 25 return _lastRunOutcome;
ashleymills 4:1f8e079924ba 26 }
ashleymills 4:1f8e079924ba 27
ashleymills 4:1f8e079924ba 28 virtual void setupTest() {
ashleymills 4:1f8e079924ba 29 }
ashleymills 4:1f8e079924ba 30
ashleymills 4:1f8e079924ba 31 virtual bool runTest() {
ashleymills 4:1f8e079924ba 32 LOG("Base class runTest called!");
ashleymills 4:1f8e079924ba 33 return true;
ashleymills 4:1f8e079924ba 34 }
ashleymills 4:1f8e079924ba 35
ashleymills 8:6c30647f75d7 36 virtual void endTest() {
ashleymills 8:6c30647f75d7 37
ashleymills 4:1f8e079924ba 38 }
ashleymills 2:ea883307d02f 39
ashleymills 2:ea883307d02f 40 protected:
ashleymills 2:ea883307d02f 41 VodafoneUSBModem *_modem;
nherriot 13:8b69853966f8 42 const int _testCaseNumber;
ashleymills 27:0297dbc3252b 43 public:
ashleymills 3:28336c2e94e4 44 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 45 bool _lastRunOutcome;
nherriot 13:8b69853966f8 46
ashleymills 1:0d63e4db8503 47 };