Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
nherriot
Date:
Wed Aug 29 14:13:49 2012 +0000
Revision:
13:8b69853966f8
Parent:
8:6c30647f75d7
Child:
27:0297dbc3252b
Child:
28:c630a04a7198
adding test number to base class, init lists and changing constructors for 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"
ashleymills 2:ea883307d02f 4 class VodafoneTestCase {
ashleymills 2:ea883307d02f 5 public:
nherriot 13:8b69853966f8 6 VodafoneTestCase(VodafoneUSBModem *m, int tcNumber) : _modem(m), _testCaseNumber(tcNumber) , _lastRunTime(0), _lastRunOutcome(false){
ashleymills 2:ea883307d02f 7 }
ashleymills 2:ea883307d02f 8
ashleymills 4:1f8e079924ba 9 bool run() {
ashleymills 8:6c30647f75d7 10 _lastRunTime = time(NULL);
ashleymills 4:1f8e079924ba 11 setupTest();
ashleymills 8:6c30647f75d7 12 _lastRunOutcome = runTest();
ashleymills 8:6c30647f75d7 13 endTest();
ashleymills 8:6c30647f75d7 14 return _lastRunOutcome;
ashleymills 4:1f8e079924ba 15 }
ashleymills 4:1f8e079924ba 16
ashleymills 4:1f8e079924ba 17 virtual void setupTest() {
ashleymills 4:1f8e079924ba 18 }
ashleymills 4:1f8e079924ba 19
ashleymills 4:1f8e079924ba 20 virtual bool runTest() {
ashleymills 4:1f8e079924ba 21 LOG("Base class runTest called!");
ashleymills 4:1f8e079924ba 22 return true;
ashleymills 4:1f8e079924ba 23 }
ashleymills 4:1f8e079924ba 24
ashleymills 8:6c30647f75d7 25 virtual void endTest() {
ashleymills 8:6c30647f75d7 26
ashleymills 4:1f8e079924ba 27 }
ashleymills 2:ea883307d02f 28
ashleymills 2:ea883307d02f 29 protected:
ashleymills 2:ea883307d02f 30 VodafoneUSBModem *_modem;
nherriot 13:8b69853966f8 31 const int _testCaseNumber;
ashleymills 3:28336c2e94e4 32 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 33 bool _lastRunOutcome;
nherriot 13:8b69853966f8 34
ashleymills 1:0d63e4db8503 35 };