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 33 static void AddTests(BTestSuite& suite); 34 35 private: 36 TestServer fTestServer; 37 }; 38 39 40 class HttpsTest: public HttpTest { 41 public: 42 HttpsTest(); 43 }; 44 45 46 #endif 47