xref: /haiku/src/tests/kits/net/service/HttpTest.h (revision 6eafb4b041ad79cb936b2041fdb9c56b1209cc10)
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 								void	ProxyTest();
28 
29 	static						void	AddTests(BTestSuite& suite);
30 
31 private:
32 								void	_AuthTest(BUrl& url);
33 
34 	template<class T> static	void	_AddCommonTests(BString prefix,
35 											CppUnit::TestSuite& suite);
36 
37 protected:
38 								BUrl	fBaseUrl;
39 };
40 
41 
42 class HttpsTest: public HttpTest {
43 public:
44 								HttpsTest();
45 };
46 
47 
48 #endif
49