Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
nherriot
Date:
Mon Sep 10 04:59:11 2012 +0000
Revision:
28:c630a04a7198
Parent:
13:8b69853966f8
Child:
29:c0e6f198db84
Adding details to test case 16 and 13 where each test depends on one to send and one to receive. Also removing constants to VodafoneTestCase.h to have them in one place for all tests. Created several const char strings for all test cases.

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 28:c630a04a7198 9
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 3:28336c2e94e4 43 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 44 bool _lastRunOutcome;
nherriot 13:8b69853966f8 45
ashleymills 1:0d63e4db8503 46 };