Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Committer:
ashleymills
Date:
Fri Sep 14 12:16:09 2012 +0000
Revision:
40:32b0558320ea
Parent:
36:dd730ff4962e
Child:
44:6d0ac4747f5b
Refactoring.

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
ashleymills 2:ea883307d02f 5 class VodafoneTestCase {
ashleymills 2:ea883307d02f 6 public:
ashleymills 33:16126e029d58 7 VodafoneTestCase(VodafoneUSBModem *m) : _modem(m) , _lastRunTime(0), _lastRunOutcome(false) {
ashleymills 2:ea883307d02f 8 }
ashleymills 2:ea883307d02f 9
ashleymills 4:1f8e079924ba 10 bool run() {
ashleymills 4:1f8e079924ba 11 setupTest();
ashleymills 34:d9e45aad85f2 12 _lastRunOutcome = execute();
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 34:d9e45aad85f2 20 virtual bool execute() {
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;
ashleymills 32:8ff0b67bb58c 31
ashleymills 27:0297dbc3252b 32 public:
ashleymills 3:28336c2e94e4 33 time_t _lastRunTime;
ashleymills 3:28336c2e94e4 34 bool _lastRunOutcome;
ashleymills 33:16126e029d58 35 int _testCaseNumber;
ashleymills 33:16126e029d58 36 const char* _description;
ashleymills 1:0d63e4db8503 37 };