Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
VodafoneTestCase.h@44:6d0ac4747f5b, 2012-09-17 (annotated)
- Committer:
- ashleymills
- Date:
- Mon Sep 17 13:28:39 2012 +0000
- Revision:
- 44:6d0ac4747f5b
- Parent:
- 40:32b0558320ea
- Child:
- 60:7efce4a3c26f
Refactored names. Privatised virtuals to avoid bugs (bitten).
Who changed what in which revision?
User | Revision | Line number | New 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 | 44:6d0ac4747f5b | 12 | _lastRunOutcome = executeTest(); |
ashleymills | 8:6c30647f75d7 | 13 | endTest(); |
ashleymills | 8:6c30647f75d7 | 14 | return _lastRunOutcome; |
ashleymills | 4:1f8e079924ba | 15 | } |
ashleymills | 4:1f8e079924ba | 16 | |
ashleymills | 44:6d0ac4747f5b | 17 | private: |
ashleymills | 44:6d0ac4747f5b | 18 | |
ashleymills | 4:1f8e079924ba | 19 | virtual void setupTest() { |
ashleymills | 4:1f8e079924ba | 20 | } |
ashleymills | 4:1f8e079924ba | 21 | |
ashleymills | 44:6d0ac4747f5b | 22 | virtual bool executeTest() { |
ashleymills | 4:1f8e079924ba | 23 | LOG("Base class runTest called!"); |
ashleymills | 4:1f8e079924ba | 24 | return true; |
ashleymills | 4:1f8e079924ba | 25 | } |
ashleymills | 4:1f8e079924ba | 26 | |
ashleymills | 8:6c30647f75d7 | 27 | virtual void endTest() { |
ashleymills | 8:6c30647f75d7 | 28 | |
ashleymills | 4:1f8e079924ba | 29 | } |
ashleymills | 2:ea883307d02f | 30 | |
ashleymills | 2:ea883307d02f | 31 | protected: |
ashleymills | 2:ea883307d02f | 32 | VodafoneUSBModem *_modem; |
ashleymills | 32:8ff0b67bb58c | 33 | |
ashleymills | 27:0297dbc3252b | 34 | public: |
ashleymills | 3:28336c2e94e4 | 35 | time_t _lastRunTime; |
ashleymills | 3:28336c2e94e4 | 36 | bool _lastRunOutcome; |
ashleymills | 33:16126e029d58 | 37 | int _testCaseNumber; |
ashleymills | 33:16126e029d58 | 38 | const char* _description; |
ashleymills | 1:0d63e4db8503 | 39 | }; |