xref: /haiku/src/tests/kits/net/libnetapi/NetworkUrlTest.h (revision 05fc1277c47440dc36134816d70e5723c99cfcd2)
1 /*
2  * Copyright 2016, Andrew Lindesay, apl@lindesay.co.nz
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef NETWORK_URL_TEST_H
6 #define NETWORK_URL_TEST_H
7 
8 
9 #include <TestCase.h>
10 #include <TestSuite.h>
11 
12 
13 class NetworkUrlTest : public CppUnit::TestCase {
14 public:
15 								NetworkUrlTest();
16 	virtual						~NetworkUrlTest();
17 
18 	virtual	void				setUp();
19 	virtual	void				tearDown();
20 
21 			void				TestValidFullUrl();
22 
23 			void				TestFileUrl();
24 
25 			void				TestWithUserNameAndPasswordNoHostAndPort();
26 			void				TestHostAndPortWithNoUserNameAndPassword();
27 			void				TestHostWithNoPortOrUserNameAndPassword();
28 			void				TestHostWithNoPortNoPath();
29 			void				TestHostWithPortNoPath();
30 			void				TestHostWithEmptyPort();
31 
32 			void				TestWhitespaceBefore();
33 			void				TestWhitespaceAfter();
34 			void				TestWhitespaceMiddle();
35 			void				TestHttpNoHost();
36 
37 	static	void				AddTests(BTestSuite& suite);
38 
39 };
40 
41 
42 #endif	// NETWORK_URL_TEST_H
43