Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Thu Sep 13 08:21:25 2012 +0000
Revision:
32:8ff0b67bb58c
Parent:
30:dd2beda340c6
Child:
33:16126e029d58
Changing the framework slightly.

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 32:8ff0b67bb58c 18 _description = "This is a dummy description.";
ashleymills 2:ea883307d02f 19 }
ashleymills 2:ea883307d02f 20
ashleymills 4:1f8e079924ba 21 bool run() {
ashleymills 8:6c30647f75d7 22 _lastRunTime = time(NULL);
ashleymills 4:1f8e079924ba 23 setupTest();
ashleymills 8:6c30647f75d7 24 _lastRunOutcome = runTest();
ashleymills 8:6c30647f75d7 25 endTest();
ashleymills 8:6c30647f75d7 26 return _lastRunOutcome;
ashleymills 4:1f8e079924ba 27 }
ashleymills 4:1f8e079924ba 28
ashleymills 4:1f8e079924ba 29 virtual void setupTest() {
ashleymills 4:1f8e079924ba 30 }
ashleymills 4:1f8e079924ba 31
ashleymills 4:1f8e079924ba 32 virtual bool runTest() {
ashleymills 4:1f8e079924ba 33 LOG("Base class runTest called!");
ashleymills 4:1f8e079924ba 34 return true;
ashleymills 4:1f8e079924ba 35 }
ashleymills 4:1f8e079924ba 36
ashleymills 8:6c30647f75d7 37 virtual void endTest() {
ashleymills 8:6c30647f75d7 38
ashleymills 4:1f8e079924ba 39 }
ashleymills 2:ea883307d02f 40
ashleymills 2:ea883307d02f 41 protected:
ashleymills 2:ea883307d02f 42 VodafoneUSBModem *_modem;
ashleymills 32:8ff0b67bb58c 43
ashleymills 27:0297dbc3252b 44 public:
ashleymills 3:28336c2e94e4 45 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 46 bool _lastRunOutcome;
ashleymills 32:8ff0b67bb58c 47 const int _testCaseNumber;
ashleymills 32:8ff0b67bb58c 48 char* _description;
ashleymills 1:0d63e4db8503 49 };