Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Thu Sep 06 15:13:38 2012 +0000
Revision:
27:0297dbc3252b
Parent:
13:8b69853966f8
Child:
30:dd2beda340c6
Commended out dependency stuff. TestManager now prints numbers and descriptions of failed tests.

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 27:0297dbc3252b 32 public:
ashleymills 3:28336c2e94e4 33 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 34 bool _lastRunOutcome;
nherriot 13:8b69853966f8 35
ashleymills 1:0d63e4db8503 36 };