1 /* 2 * Copyright 2014 Haiku, inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef HTTP_TEST_H 6 #define HTTP_TEST_H 7 8 9 #include <Url.h> 10 11 #include <TestCase.h> 12 #include <TestSuite.h> 13 14 #include <cppunit/TestSuite.h> 15 16 17 class HttpTest: public BTestCase { 18 public: 19 HttpTest(); 20 virtual ~HttpTest(); 21 22 void GetTest(); 23 void PortTest(); 24 void UploadTest(); 25 void AuthBasicTest(); 26 void AuthDigestTest(); 27 28 static void AddTests(BTestSuite& suite); 29 30 private: 31 void _AuthTest(BUrl& url); 32 33 template<class T> static void _AddCommonTests(BString prefix, 34 CppUnit::TestSuite& suite); 35 36 protected: 37 BUrl fBaseUrl; 38 }; 39 40 41 class HttpsTest: public HttpTest { 42 public: 43 HttpsTest(); 44 }; 45 46 47 #endif 48