1 /* 2 * Copyright 2014-2020 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 #include <tools/cppunit/ThreadedTestCase.h> 16 17 #include "TestServer.h" 18 19 20 class HttpTest: public BThreadedTestCase { 21 public: 22 HttpTest(TestServerMode mode = TEST_SERVER_MODE_HTTP); 23 virtual ~HttpTest(); 24 25 virtual void setUp(); 26 27 void GetTest(); 28 void UploadTest(); 29 void AuthBasicTest(); 30 void AuthDigestTest(); 31 void ProxyTest(); 32 void AutoRedirectTest(); 33 34 static void AddTests(BTestSuite& suite); 35 36 private: 37 void _GetTest(const BString& path); 38 private: 39 TestServer fTestServer; 40 }; 41 42 43 class HttpsTest: public HttpTest { 44 public: 45 HttpsTest(); 46 }; 47 48 49 #endif 50