Vodafone Test Suite

Dependencies:   mbed-rtos mbed HTTPClient VodafoneUSBModem

Revision:
40:32b0558320ea
Parent:
37:847f5f86e9ff
Child:
44:6d0ac4747f5b
--- a/Tests/Test10.h	Thu Sep 13 15:46:50 2012 +0000
+++ b/Tests/Test10.h	Fri Sep 14 12:16:09 2012 +0000
@@ -3,58 +3,10 @@
 #include "HTTPClient.h"
 extern const char *gTest10Description;
 
-//const int gTest10Depends[] = {};
-
 class Test10 : public VodafoneTestCase {
    public: 
-      Test10(VodafoneUSBModem *m) : VodafoneTestCase(m) {
-         _description = gTest10Description;
-         _testCaseNumber = 10;
-      }
-      
-      virtual void setupTest() {
-         
-      }
-   
-      virtual bool execute() {
-         HTTPClient http;
-         char msgBuffer[125];
-         bool outcome = true;
-         LOG("Description: %s",gTest10Description);
-         LOG("Connecting to internet");
-         if(_modem->connect("internet","web","web")==0) {
-            LOG("Connected to internet");
-         } else {
-            LOG("Failed to connect to internet");
-            outcome = false;
-         }
-       
-         LOG("Test %d, retrieving a 5MB file via HTTP.", _testCaseNumber);
-         if(http.get("http://www.m2mthings.com/test100.txt", msgBuffer, 125)==0) {
-            LOG("Got \"%s\"",msgBuffer);
-            char c = 0;
-            for(int i=0; i<100; i++) {
-               if(msgBuffer[i]!=c) {
-                  LOG("Strings do not match at char %d (%x,%x)",i,c,msgBuffer[i]);
-                  outcome = false;
-                  break;
-               }
-               c++;
-               if(c==256)
-                  c = 0;
-            }
-         } else {
-            LOG("HTTP get failure");
-            outcome = false;
-         }
-         _modem->disconnect();
-         return outcome;
-      }
-      
-      virtual void endTest() {
-         
-      }
-      
-   private:
-      
+      Test10(VodafoneUSBModem *m);
+      virtual void setupTest();
+      virtual bool execute();
+      virtual void endTest();
 };
\ No newline at end of file